<template>
  <div class="containerWrap">
    <div class="mainContent">
      <div class="topInfo">
        <ul>
          <li>
            <span>缴纳单位：</span>
            <span>{{ payUnit || '--' }}</span>
          </li>
          <li>
            <span>缴纳银行：</span>
            <span>{{ cashDepositInfo.bankName || '--' }}</span>
          </li>
          <li>
            <span>缴纳账号：</span>
            <span>{{ cashDepositInfo.account || '--' }}</span>
          </li>
          <li>
            <span>缴纳形式：</span>
            <span>{{ cashDepositInfo.payMethodDesc || '--' }}</span>
          </li>
        </ul>
      </div>
      <el-row class="centerSection">
        <el-col :span="12" class="centerLeft">
          <div class="centerTitle">保证金余额</div>
          <div class="balanceTotal fontColorTheme">
            {{ cashDepositInfo.balance }}万元
          </div>
          <div class="btn">
            <el-button
              v-if="isShowAdd"
              type="primary"
              round
              @click="supplyOperate()"
              class="saveBtn"
              >补缴</el-button
            >
            <el-button
              v-if="isShowAdd"
              type="primary"
              round
              @click="expenditureOperate()"
              class="saveBtn"
              >动用</el-button
            >
            <el-button
              v-if="isShowAdd"
              type="primary"
              round
              @click="payBackOperate()"
              class="saveBtn"
              >返还</el-button
            >
          </div>
        </el-col>
        <!-- 部分免缴有减免保证金 -->
        <el-col :span="12" class="centerRight">
          <div
            :class="{
              mrginTop: payMethod !== 'PART_PAY',
              mrginTopLess: payMethod === 'PART_PAY',
            }"
          >
            应缴保证金：
            <span class="fontColorTheme"
              >{{ cashDepositInfo.shouldPayTotal }}万元</span
            >
          </div>
          <div
            :class="{
              mrginTop: payMethod !== 'PART_PAY',
              mrginTopLess: payMethod === 'PART_PAY',
            }"
          >
            实缴保证金：
            <span class="fontColorTheme"
              >{{ cashDepositInfo.payTotal }}万元</span
            >
          </div>
          <div v-show="payMethod === 'PART_PAY'" class="mrginTopLess">
            减免保证金：
            <span class="fontColorTheme"
              >{{ cashDepositInfo.exemptionAccountMill }}万元</span
            >
          </div>
          <div v-show="payMethod === 'WAIT_PAY'" class="mrginTopLess">
            缓缴周期：
            <span class="fontColorTheme">{{
              cashDepositInfo.waitPayCycle
                ? cashDepositInfo.waitPayCycle.indexOf('undefined') > -1
                  ? '--'
                  : cashDepositInfo.waitPayCycle
                : '--'
            }}</span>
          </div>
          <div class="imgs">
            <img
              v-show="cashDepositInfo.status === 'RETURN'"
              src="../../../static/img/deposit/depositBacked.png"
              alt=""
            />
            <img
              v-show="cashDepositInfo.status === 'DEPOSIT'"
              src="../../../static/img/deposit/depositPaid.png"
              alt=""
            />
            <img
              v-show="cashDepositInfo.status === 'NO_DEPOSIT'"
              src="../../../static/img/deposit/depositNoPay.png"
              alt=""
            />
          </div>
        </el-col>
      </el-row>
    </div>
    <div class="spacing"></div>
    <div class="tableBlock">
      <div class="secondaryTitle secondaryTitleTheme">保证金流水记录</div>
      <!-- 表格 -->
      <el-table
        :data="tableData"
        :header-cell-style="{ background: '#eef1f6', color: '#606266' }"
        highlight-current-row
        stripe
        v-loading="loading"
        style="border: 1px solid #dfe6ec; margin-top: 24px"
      >
        <el-table-column
          align="center"
          prop="operationDate"
          label="时间"
          :formatter="formatTd"
        ></el-table-column>
        <el-table-column
          align="center"
          prop="operationDesc"
          label="操作类型"
          :formatter="formatTd"
        ></el-table-column>
        <el-table-column
          align="center"
          prop="accTotal"
          label="金额(元)"
          :formatter="formatTd"
        ></el-table-column>
        <el-table-column
          align="center"
          prop="approvalStatusDesc"
          label="审核状态"
          :formatter="formatTd"
        ></el-table-column>
        <el-table-column
          align="center"
          prop="addUserDesc"
          label="操作人"
          :formatter="formatTd"
        ></el-table-column>
        <el-table-column align="left" label="操作" width="250px" fixed="right">
          <template slot-scope="scope">
            <div v-if="loginType === 'JC'">
              <!-- 待审核->查看  审核 驳回    已驳回->修改 删除   已审核以及监察添加无需审核“--” 情况->查看 修改 -->
              <div v-if="scope.row.approvalStatusDesc === '待审核'">
                <el-link
                  type="primary"
                  @click="detailEvent(scope.row.id, scope.row.operationType)"
                  >查看详情</el-link
                >
                <el-link
                  type="primary"
                  @click="toCheckEvent(scope.row.id, scope.row.operationType)"
                  >审核</el-link
                >
                <el-link
                  type="primary"
                  @click="toRejectEvent(scope.row.id, scope.row.operationType)"
                  >驳回</el-link
                >
              </div>
              <div v-else-if="scope.row.approvalStatusDesc === '已驳回'">
                <el-link
                  v-if="isShowUpdate"
                  type="primary"
                  @click="updateEvent(scope.row.id, scope.row.operationType)"
                  >修改</el-link
                >
                <el-link
                  v-if="isShowDel"
                  type="primary"
                  @click="deleteEvent(scope.row.id, scope.row.operationType)"
                  >删除</el-link
                >
              </div>
              <div v-else>
                <el-link
                  type="primary"
                  @click="detailEvent(scope.row.id, scope.row.operationType)"
                  >查看详情</el-link
                >
                <el-link
                  v-if="isShowUpdate"
                  type="primary"
                  @click="updateEvent(scope.row.id, scope.row.operationType)"
                  >修改</el-link
                >
              </div>
            </div>
            <div v-else-if="loginType === 'XM' || loginType === 'QY'">
              <!-- 待审核->查看  撤回    已驳回->修改 删除     已撤回->查看 修改 删除   已审核以及监察添加无需审核“--” 情况 -->
              <div v-if="scope.row.approvalStatusDesc === '待审核'">
                <el-link
                  type="primary"
                  @click="detailEvent(scope.row.id, scope.row.operationType)"
                  >查看详情</el-link
                >
                <el-link
                  type="primary"
                  @click="toRecallEvent(scope.row.id, scope.row.operationType)"
                  >撤回</el-link
                >
              </div>
              <div v-else-if="scope.row.approvalStatusDesc === '已驳回'">
                <el-link
                  v-if="isShowUpdate"
                  type="primary"
                  @click="updateEvent(scope.row.id, scope.row.operationType)"
                  >修改</el-link
                >
                <el-link
                  v-if="isShowDel"
                  type="primary"
                  @click="deleteEvent(scope.row.id, scope.row.operationType)"
                  >删除</el-link
                >
              </div>
              <div v-else-if="scope.row.approvalStatusDesc === '已撤回'">
                <el-link
                  type="primary"
                  @click="detailEvent(scope.row.id, scope.row.operationType)"
                  >查看详情</el-link
                >
                <el-link
                  v-if="isShowUpdate"
                  type="primary"
                  @click="updateEvent(scope.row.id, scope.row.operationType)"
                  >修改</el-link
                >
                <el-link
                  v-if="isShowDel"
                  type="primary"
                  @click="deleteEvent(scope.row.id, scope.row.operationType)"
                  >删除</el-link
                >
              </div>
              <el-link
                v-else
                type="primary"
                @click="detailEvent(scope.row.id, scope.row.operationType)"
                >查看详情</el-link
              >
            </div>
          </template>
        </el-table-column>
        <div slot="empty" v-show="isShow">
          <emptyTable emptyText="暂无相关信息"></emptyTable>
        </div>
      </el-table>
      <Pagination
        ref="pagination"
        @getList="getTableList"
        :requestUrl="requestUrl"
        :filterField="filterField"
        :pageSize="pageSize"
        :pageSizes="pageSizes"
      ></Pagination>
    </div>
    <!-- 补缴添加、修改弹窗 -->
    <el-dialog
      :title="eventType === 'add' ? '添加补缴记录' : '修改补缴记录'"
      width="640px"
      :visible.sync="supplyFormVisible"
      :close-on-click-modal="false"
      @close="closeFormDialog('supplyFormVisible', 'supplyForm')"
      custom-class="dialog-minwidth"
      :modal-append-to-body="false"
    >
      <el-form
        :model="supplyForm"
        :rules="supplyFormRule"
        ref="supplyForm"
        label-width="100px"
        class="form"
      >
        <!-- 资金存入-（全额缴纳/部分免缴）存在缴纳银行和缴纳账号信息 -->
        <el-form-item
          label="缴纳银行："
          prop="bankOne"
          v-if="
            method === 'FUNDDEPOSIT' &&
            payMethod === 'WAIT_PAY' &&
            tableData.length == 0
          "
        >
          <el-radio-group
            v-model="supplyForm.bankOne"
            @change="changeBankName1"
          >
            <el-radio
              v-for="(item, index) in bankNameList"
              :key="index"
              :label="item.bankId + ',' + item.account + ',' + item.bankName"
              >{{ item.bankName }}</el-radio
            >
          </el-radio-group>
          <span style="color: red" v-if="noBank">
            <i class="icon iconfont iconshengming"></i>
            该项目所在的区域暂未设置缴纳银行
          </span>
        </el-form-item>
        <el-form-item
          label="缴纳账号："
          prop="depositAccountId"
          v-if="
            method === 'FUNDDEPOSIT' &&
            payMethod === 'WAIT_PAY' &&
            tableData.length == 0
          "
        >
          <span style="color: #606266">{{ supplyForm.account }}</span>
        </el-form-item>
        <el-form-item label="补缴日期：" prop="date">
          <el-date-picker
            class="mWidth"
            value-format="yyyy-MM-dd"
            v-model="supplyForm.date"
            type="date"
            placeholder="请选择保证金补缴的日期"
            :picker-options="pickerOptions"
          ></el-date-picker>
        </el-form-item>
        <el-form-item label="应补金额：" prop="shouldPay">
          <span class="greenWord fontColorTheme"
            >{{ supplyForm.shouldPay }}元（应缴总额 - 余额）</span
          >
        </el-form-item>
        <el-form-item label="实缴金额：" prop="actPay">
          <el-input
            v-model.trim="supplyForm.actPay"
            clearable
            style="width: 193px"
            placeholder="请输入实缴金额"
          ></el-input>
          <span class="unitMaLf">元</span>
        </el-form-item>
        <el-form-item label="业务办理人：" prop="operator">
          <el-input
            class="mWidth"
            v-model.trim="supplyForm.operator"
            clearable
            placeholder="请输入业务办理人"
          ></el-input>
        </el-form-item>
        <el-row>
          <el-col :span="24">
            <el-form-item label="缴纳凭证：">
              <uploadAnnex
                class="mWidth"
                @getFileList="getFileListSupply"
                :limitationFactor="limitationFactorSupply"
                @getFile="getFileSupply"
                :upLoadFile="supplyForm.uploadFile"
              />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <uploadResult
              style="margin-left: 100px !important"
              :resultList="supplyForm.uploadFile"
              @callBackResult="getFileSupply"
            />
          </el-col>
        </el-row>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button
          class="cancel"
          @click.native="closeFormDialog('supplyFormVisible', 'supplyForm')"
          >取 消</el-button
        >
        <el-button
          type="primary"
          @click.native="saveForm('supplyForm', 'supplyFormVisible')"
          class="save"
          :loading="isLoading"
          >确 定</el-button
        >
      </span>
    </el-dialog>
    <!-- 动用添加、修改弹窗 -->
    <el-dialog
      width="640px"
      :title="eventType === 'add' ? '添加动用记录' : '修改动用记录'"
      :visible.sync="expenditureFormVisible"
      :close-on-click-modal="false"
      @close="closeFormDialog('expenditureFormVisible', 'expenditureForm')"
      custom-class="dialog-minwidth"
      :modal-append-to-body="false"
    >
      <el-form
        :model="expenditureForm"
        :rules="expenditureFormRule"
        ref="expenditureForm"
        label-width="100px"
        class="form"
        style="padding-top: 8px"
      >
        <el-form-item label="动用日期：" prop="date">
          <el-date-picker
            class="mWidth"
            value-format="yyyy-MM-dd"
            v-model="expenditureForm.date"
            type="date"
            placeholder="请选择保证金动用的日期"
            :picker-options="pickerOptions"
          ></el-date-picker>
        </el-form-item>
        <el-form-item label="可动用金额：" prop="canPay">
          <span class="greenWord fontColorTheme"
            >{{ expenditureForm.canPay }}元（余额）</span
          >
        </el-form-item>
        <el-form-item label="动用金额：" prop="actPay">
          <el-input
            class="mWidth"
            v-model.trim="expenditureForm.actPay"
            clearable
            placeholder="请填写动用金额"
          ></el-input>
          <span class="unitMaLf">元</span>
        </el-form-item>
        <el-form-item label="动用方式：" prop="payType">
          <el-radio-group v-model="expenditureForm.payType">
            <el-radio label="TRANSFER">转账</el-radio>
            <el-radio label="CASH">现金</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item
          label="收款账号："
          prop="accountType"
          v-if="expenditureForm.payType === 'TRANSFER'"
        >
          <el-radio-group v-model="expenditureForm.accountType" class="mWidth">
            <el-radio label="ACCOUNT">工资专户</el-radio>
            <el-radio label="OTHER">其他账号</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item
          label="其他账号："
          prop="accountNum"
          v-if="
            expenditureForm.payType === 'TRANSFER' &&
            expenditureForm.accountType === 'OTHER'
          "
        >
          <el-input
            class="mWidth"
            v-model.trim="expenditureForm.accountNum"
            clearable
            placeholder="请填写其他账号"
            maxlength="64"
          ></el-input>
        </el-form-item>
        <el-form-item label="业务办理人：" prop="operator">
          <el-input
            class="mWidth"
            v-model.trim="expenditureForm.operator"
            clearable
            placeholder="请填写业务办理人"
          ></el-input>
        </el-form-item>
        <el-form-item label="动用原因：" prop="reason">
          <el-input
            type="textarea"
            rows="3"
            class="mWidth"
            v-model.trim="expenditureForm.reason"
            clearable
            placeholder="请填写动用原因"
          ></el-input>
        </el-form-item>
        <el-row>
          <el-col :span="24">
            <el-form-item label="动用凭证：">
              <uploadAnnex
                class="mWidth"
                @getFileList="getFileListExpend"
                :limitationFactor="limitationFactorExpend"
                @getFile="getFileExpend"
                :upLoadFile="expenditureForm.uploadFile"
              />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <uploadResult
              style="margin-left: 100px !important"
              :resultList="expenditureForm.uploadFile"
              @callBackResult="getFileExpend"
            />
          </el-col>
        </el-row>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button
          class="cancel"
          @click.native="
            closeFormDialog('expenditureFormVisible', 'expenditureForm')
          "
          >取 消</el-button
        >
        <el-button
          type="primary"
          @click.native="saveForm('expenditureForm', 'expenditureFormVisible')"
          class="save"
          :loading="isLoading"
          >确 定</el-button
        >
      </span>
    </el-dialog>
    <!-- 返还添加、修改弹窗 -->
    <el-dialog
      width="640px"
      :title="eventType === 'add' ? '添加返还记录' : '修改返还记录'"
      :visible.sync="payBackFormVisible"
      :close-on-click-modal="false"
      @close="closeFormDialog('payBackFormVisible', 'payBackForm')"
      custom-class="dialog-minwidth"
      :modal-append-to-body="false"
    >
      <el-form
        :model="payBackForm"
        :rules="payBackFormRule"
        ref="payBackForm"
        label-width="100px"
        class="form"
        style="padding-top: 8px"
      >
        <el-form-item label="返还日期：" prop="date">
          <el-date-picker
            class="mWidth"
            value-format="yyyy-MM-dd"
            v-model="payBackForm.date"
            type="date"
            placeholder="请选择保证金返还的日期"
            :picker-options="pickerOptions"
          ></el-date-picker>
        </el-form-item>
        <el-form-item label="可返还金额：" prop="canPay">
          <span class="greenWord fontColorTheme"
            >{{ payBackForm.canPay }}元（余额）</span
          >
        </el-form-item>
        <el-form-item label="返还金额：" prop="actPay">
          <el-input
            class="mWidth"
            v-model.trim="payBackForm.actPay"
            clearable
            placeholder="请填写返还本金"
          ></el-input>
          <span class="unitMaLf">元</span>
        </el-form-item>
        <el-form-item label="返还方式：" prop="payType">
          <el-radio-group v-model="payBackForm.payType">
            <el-radio label="TRANSFER">转账</el-radio>
            <el-radio label="CASH">现金</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item
          label="收款账号："
          prop="accountType"
          v-if="payBackForm.payType === 'TRANSFER'"
        >
          <el-radio-group v-model="payBackForm.accountType" class="mWidth">
            <el-radio label="ACCOUNT">工资专户</el-radio>
            <el-radio label="OTHER">其他账号</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item
          label="其他账号："
          prop="accountNum"
          v-if="
            payBackForm.payType === 'TRANSFER' &&
            payBackForm.accountType === 'OTHER'
          "
        >
          <el-input
            class="mWidth"
            v-model.trim="payBackForm.accountNum"
            clearable
            placeholder="请填写其他账号"
            maxlength="64"
          ></el-input>
        </el-form-item>
        <el-form-item label="业务办理人：" prop="operator">
          <el-input
            class="mWidth"
            v-model.trim="payBackForm.operator"
            clearable
            placeholder="请填写业务办理人"
          ></el-input>
        </el-form-item>
        <el-form-item label="备注：" prop="remark">
          <el-input
            class="mWidth"
            type="textarea"
            rows="3"
            v-model.trim="payBackForm.reason"
            clearable
            placeholder="请填写返还原因"
          ></el-input>
        </el-form-item>
        <el-row>
          <el-col :span="24">
            <el-form-item label="返还凭证：">
              <uploadAnnex
                class="mWidth"
                @getFileList="getFileListPayBack"
                :limitationFactor="limitationFactorPayBack"
                @getFile="getFilePayBack"
                :upLoadFile="payBackForm.uploadFile"
              />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <uploadResult
              style="margin-left: 100px !important"
              :resultList="payBackForm.uploadFile"
              @callBackResult="getFilePayBack"
            />
          </el-col>
        </el-row>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button
          class="cancel"
          @click.native="closeFormDialog('payBackFormVisible', 'payBackForm')"
          >取 消</el-button
        >
        <el-button
          type="primary"
          @click.native="saveForm('payBackForm', 'payBackFormVisible')"
          class="save"
          :loading="isLoading"
          >确 定</el-button
        >
      </span>
    </el-dialog>
    <!-- 缴纳修改弹窗 -->
    <el-dialog
      title="修改缴纳记录"
      width="640px"
      :visible.sync="payFormVisible"
      :close-on-click-modal="false"
      @close="closeFormDialog('payFormVisible', 'payForm')"
      custom-class="dialog-minwidth"
      :modal-append-to-body="false"
    >
      <el-form
        :model="formData"
        label-width="135px"
        :rules="formRules"
        ref="formData"
        class="payFormXg"
        v-if="showForm"
      >
        <el-form-item label="项目名称：">
          <el-select
            style="display: none"
            ref="projectNameSearch"
            v-model="formData.projectId"
            clearable
            filterable
            placeholder="请输入项目名称进行搜索"
          >
            <el-option
              v-for="(item, index) in projectOptions"
              :key="index"
              :label="item.projectName"
              :value="index"
            ></el-option>
          </el-select>
          <span>{{ cashDepositInfo.projectName || '--' }}</span>
        </el-form-item>
        <el-form-item label="保证金缴纳方式：" prop="method">
          <el-radio-group
            :disabled="isDisabled"
            v-if="isHsUser()"
            v-model="formData.method"
            @change="payTypeChange"
          >
            <el-radio label="FUNDDEPOSIT">资金存入</el-radio>
            <el-radio label="BANKGUARANTEE">银行保函</el-radio>
            <el-radio label="BANKPOLICY">保险保单</el-radio>
          </el-radio-group>
          <el-radio-group
            :disabled="isDisabled"
            v-else
            v-model="formData.method"
            @change="payTypeChange"
          >
            <el-radio label="FUNDDEPOSIT">资金存入</el-radio>
            <el-radio label="BANKGUARANTEE">银行保函</el-radio>
            <el-radio label="OWNERPOLICY">{{
              isXiangYangUser() ? '工程担保公司保函' : '业主担保'
            }}</el-radio>
            <el-radio label="BANKPOLICY">保险保单</el-radio>
          </el-radio-group>
        </el-form-item>
        <!-- 选择资金存入才显示缴纳形式 -->
        <el-form-item
          label="缴纳形式："
          prop="payMethod"
          v-if="formData.method === 'FUNDDEPOSIT'"
        >
          <el-radio-group
            :disabled="isDisabled"
            v-model="formData.payMethod"
            @change="payTypeChange"
          >
            <el-radio label="ALL_PAY">全额缴纳</el-radio>
            <el-radio label="PART_PAY">部分免缴</el-radio>
            <el-radio label="ALL_NO_PAY">全额免缴</el-radio>
            <!-- <el-radio label="WAIT_PAY">缓缴</el-radio> -->
          </el-radio-group>
        </el-form-item>
        <el-form-item label="缴纳单位：" prop="reciveunit">
          <el-radio-group v-model="formData.reciveunit">
            <el-radio
              v-for="(item, index) in companyOptions"
              :key="index"
              :label="item.companyType"
              >{{ item.companyName }}({{
                item.companyType === '0' ? '建设方' : '施工方'
              }})</el-radio
            >
          </el-radio-group>
        </el-form-item>
        <template
          v-if="
            formData.method === 'FUNDDEPOSIT' &&
            formData.payMethod === 'WAIT_PAY'
          "
        >
          <el-form-item label="缓缴日期：" prop="operationDate">
            <el-date-picker
              class="mWidth"
              type="date"
              placeholder="请选择保证金缓缴日期"
              v-model="formData.operationDate"
              value-format="yyyy-MM-dd"
            ></el-date-picker>
          </el-form-item>
        </template>
        <template v-else>
          <el-form-item label="缴纳日期：" prop="operationDate">
            <el-date-picker
              class="mWidth"
              type="date"
              placeholder="请选择保证金缴纳日期"
              v-model="formData.operationDate"
              value-format="yyyy-MM-dd"
            ></el-date-picker>
          </el-form-item>
        </template>
        <!-- 资金存入-（全额缴纳/部分免缴）存在缴纳银行和缴纳账号信息 -->
        <el-form-item
          label="缴纳银行："
          prop="bankOne"
          v-if="
            formData.method === 'FUNDDEPOSIT' &&
            (formData.payMethod === 'ALL_PAY' ||
              formData.payMethod === 'PART_PAY')
          "
        >
          <el-radio-group
            :disabled="isDisabled"
            v-model="formData.bankOne"
            @change="changeBankName"
          >
            <el-radio
              v-for="(item, index) in bankNameList"
              :key="index"
              :label="item.bankId + ',' + item.account + ',' + item.bankName"
              >{{ item.bankName }}</el-radio
            >
          </el-radio-group>
          <span style="color: red" v-if="noBank">
            <i class="icon iconfont iconshengming"></i>
            该项目所在的区域暂未设置缴纳银行</span
          >
        </el-form-item>
        <el-form-item
          label="缴纳账号："
          prop="depositAccountId"
          v-if="
            formData.method === 'FUNDDEPOSIT' &&
            (formData.payMethod === 'ALL_PAY' ||
              formData.payMethod === 'PART_PAY')
          "
        >
          <span style="color: #606266">{{ formData.account }}</span>
        </el-form-item>
        <el-form-item label="应缴金额：" prop="shouldPay">
          <el-radio-group v-model="formDataShouldPay" @change="agreeChange()">
            <el-radio
              v-if="item.depositConfig"
              :label="item.shouldPay + '-' + item.depositConfig.scale"
              :key="index"
              v-for="(item, index) in amountPayableList"
            >
              <span v-if="item.sectionType == 1"
                >{{ item.shouldPay }}元 【
                <span
                  v-for="(items, indexs) in item.depositConfigs"
                  :key="indexs"
                >
                  <span v-if="indexs == 0"
                    >{{ items.max * 10000 }}*{{ items.scale }}%
                    <span v-if="indexs < item.depositConfigs.length - 1"
                      >+</span
                    ></span
                  >
                  <span v-else>
                    <span v-if="item.total&lt;items.max*10000"
                      >({{ item.total }}-{{
                        item.depositConfigs[indexs - 1].max * 10000
                      }})*{{ items.scale }}%
                      <span v-if="indexs < item.depositConfigs.length - 1"
                        >+</span
                      ></span
                    >
                    <span v-else
                      >({{ items.max * 10000 }}-{{ items.min * 10000 }})*{{
                        items.scale
                      }}%
                      <span v-if="indexs < item.depositConfigs.length - 1"
                        >+</span
                      ></span
                    >
                  </span> </span
                >,最高限额{{ item.upperLimit }}元】
              </span>
              <span v-else
                >{{ item.shouldPay }}元({{ item.total }}*{{
                  item.depositConfig.scale
                }}%,最高限额{{ item.depositConfig.upperLimit }}元)</span
              >
            </el-radio>
            <el-radio
              v-else
              :label="item.shouldPay + '-' + item.depositConfigs[0].scale"
              :key="index"
              v-for="(item, index) in amountPayableList"
            >
              <span v-if="item.sectionType == 1"
                >{{ item.shouldPay }}元 【
                <span
                  v-for="(items, indexs) in item.depositConfigs"
                  :key="indexs"
                >
                  <span v-if="indexs == 0"
                    >{{ items.max * 10000 }}*{{ items.scale }}%
                    <span v-if="indexs < item.depositConfigs.length - 1"
                      >+</span
                    ></span
                  >
                  <span v-else>
                    <span v-if="item.total&lt;items.max*10000"
                      >({{ item.total }}-{{
                        item.depositConfigs[indexs - 1].max * 10000
                      }})*{{ items.scale }}%
                      <span v-if="indexs < item.depositConfigs.length - 1"
                        >+</span
                      ></span
                    >
                    <span v-else
                      >({{ items.max * 10000 }}-{{ items.min * 10000 }})*{{
                        items.scale
                      }}%
                      <span v-if="indexs < item.depositConfigs.length - 1"
                        >+</span
                      ></span
                    >
                  </span> </span
                >,最高限额{{ item.upperLimit }}元】
              </span>
              <span v-else
                >{{ item.shouldPay }}元({{ item.total }}*{{
                  item.depositConfigs[0].scale
                }}%,最高限额{{ item.depositConfigs[0].upperLimit }}元)</span
              >
            </el-radio>
          </el-radio-group>
        </el-form-item>
        <template
          v-if="
            formData.method === 'BANKGUARANTEE' ||
            formData.method === 'OWNERPOLICY' ||
            formData.method === 'BANKPOLICY'
          "
        >
          <el-form-item label="担保金额：" prop="payTotal">
            <el-input
              style="width: 193px; position: relative"
              v-model.trim="formData.payTotal"
              placeholder="请输入担保金额"
            ></el-input>
            <span class="unitMaLf">元</span>
          </el-form-item>
          <el-form-item label="担保机构：" prop="guaranteeName">
            <el-input
              class="mWidth"
              maxlength="200"
              v-model.trim="formData.guaranteeName"
              placeholder="请填写担保机构全称"
            ></el-input>
          </el-form-item>
          <el-form-item label="担保生效日：" prop="guaranteeStartDate">
            <el-date-picker
              class="mWidth"
              type="date"
              placeholder="请选择保函/担保生效的日期"
              v-model="formData.guaranteeStartDate"
              value-format="yyyy-MM-dd"
            ></el-date-picker>
          </el-form-item>
          <el-form-item label="担保到期日：" prop="guaranteeEndDate">
            <el-date-picker
              class="mWidth"
              type="date"
              placeholder="请选择保函/担保到期的日期"
              v-model="formData.guaranteeEndDate"
              value-format="yyyy-MM-dd"
            ></el-date-picker>
          </el-form-item>
        </template>
        <template
          v-else-if="
            formData.method === 'FUNDDEPOSIT' &&
            formData.payMethod === 'PART_PAY'
          "
        >
          <el-form-item label="减免金额：" prop="reduceMoney">
            <el-input
              class="mWidth"
              @blur.prevent="changeCount()"
              v-model.trim="formData.reduceMoney"
              placeholder="请输入减免金额"
            ></el-input>
            <span class="unitMaLf">元</span>
          </el-form-item>
          <el-form-item label="实缴金额：">
            <span class="shouldTotal greenWord">{{ calculatePayTotal }}元</span>
          </el-form-item>
        </template>
        <template
          v-else-if="
            formData.method === 'FUNDDEPOSIT' &&
            formData.payMethod === 'ALL_NO_PAY'
          "
        >
          <el-form-item label="免缴金额：">
            <span class="shouldTotal greenWord"
              >{{ formData.shouldPay }}元</span
            >
          </el-form-item>
        </template>
        <template
          v-else-if="
            formData.method === 'FUNDDEPOSIT' &&
            formData.payMethod === 'ALL_PAY'
          "
        >
          <el-form-item label="实缴金额：" prop="payTotal">
            <el-input
              style="width: 193px; position: relative"
              v-model.trim="formData.payTotal"
              placeholder="请输入实缴金额"
            ></el-input>
            <span class="unitMaLf">元</span>
          </el-form-item>
        </template>
        <el-form-item label="业务办理人：" prop="operator">
          <el-input
            class="mWidth"
            maxlength="10"
            v-model.trim="formData.operator"
            placeholder="请填写业务实际处理人员姓名"
          ></el-input>
        </el-form-item>
        <template
          v-if="
            formData.method === 'FUNDDEPOSIT' &&
            (formData.payMethod === 'PART_PAY' ||
              formData.payMethod === 'ALL_NO_PAY' ||
              formData.payMethod === 'WAIT_PAY')
          "
        >
          <el-form-item
            :label="
              formData.payMethod === 'PART_PAY'
                ? '减免原因：'
                : formData.payMethod === 'ALL_NO_PAY'
                ? '免缴原因：'
                : '缓缴原因：'
            "
            prop="reduceRemark"
          >
            <el-input
              type="textarea"
              :rows="3"
              v-model.trim="formData.reduceRemark"
              autocomplete="off"
              :placeholder="
                formData.payMethod === 'PART_PAY'
                  ? '请填写保证金减免原因'
                  : formData.payMethod === 'ALL_NO_PAY'
                  ? '请填写保证金免缴原因'
                  : '请填写缓缴原因'
              "
              maxlength="200"
            ></el-input>
          </el-form-item>
          <el-form-item
            :label="
              formData.payMethod === 'PART_PAY'
                ? '减免凭证：'
                : formData.payMethod === 'ALL_NO_PAY'
                ? '免缴凭证：'
                : '缓缴凭证：'
            "
            prop="reducePayImg"
          >
            <div class="uploadBoxPay mWidth">
              <uploadAnnex
                @getFileList="getFileList"
                :limitationFactor="limitationFactor"
                @getFile="getFile"
                :upLoadFile="upLoadFile"
              />
            </div>
          </el-form-item>
          <el-row v-model="formData.contractImgUrl">
            <uploadResult
              style="margin-left: 135px !important"
              :resultList="upLoadFile"
              @callBackResult="getFile"
            />
          </el-row>
        </template>
        <template v-else>
          <el-form-item label="缴纳原因：" prop="remark">
            <el-input
              type="textarea"
              :rows="3"
              v-model.trim="formData.remark"
              autocomplete="off"
              class="mWidth"
              placeholder="请填写缴纳备注信息"
              maxlength="200"
            ></el-input>
          </el-form-item>
        </template>
        <!--黄石地区 缴纳形式为【资金存入】，在缴纳凭证字段上方，需新增付款银行账户信息填写表单 -->
        <div v-if="isHsUser() && formData.method === 'FUNDDEPOSIT'">
          <el-form-item label="付款银行账户：" prop="">
            <p class="formItemTip">
              填写企业付款银行账号，不支持个人账户转账，后期保证金退还将原路退回
            </p>
          </el-form-item>
          <el-form-item label="开户银行：">
            <el-input
              v-model.trim="formData.institution"
              class="mWidth"
              autocomplete="off"
              placeholder="请输入付款账户开户银行，如工商银行等"
            ></el-input>
          </el-form-item>
          <el-form-item label="支行名称：">
            <el-input
              v-model.trim="formData.branch"
              class="mWidth"
              autocomplete="off"
              placeholder="请输入"
            ></el-input>
          </el-form-item>
          <el-form-item label="账户名称：">
            <el-input
              v-model.trim="formData.name"
              class="mWidth"
              autocomplete="off"
              placeholder="请输入"
            ></el-input>
          </el-form-item>
          <el-form-item label="银行卡号：">
            <el-input
              v-model.trim="formData.cardCode"
              class="mWidth"
              autocomplete="off"
              placeholder="请输入"
            ></el-input>
          </el-form-item>
        </div>
        <!--黄石地区 缴纳形式为【银行保函】或【保险保单】 需新增填写寄件信息-->
        <div
          v-if="
            isHsUser() &&
            ['BANKGUARANTEE', 'BANKPOLICY'].includes(formData.method)
          "
        >
          <el-form-item label="寄件信息：" prop="remark">
            <p class="formItemTip">
              企业需要提前将保函或保单快递至劳动监察部门，查看
              <el-link @click="downLoadFile('sendFiles')">收件信息</el-link>
            </p>
            <p class="formItemTip">请在寄件后填写寄件人信息</p>
          </el-form-item>
          <el-form-item label="寄件人姓名：">
            <el-input
              v-model.trim="formData.institution"
              class="mWidth"
              autocomplete="off"
              placeholder="请输入"
            ></el-input>
          </el-form-item>
          <el-form-item label="联系电话：">
            <el-input
              v-model.trim="formData.branch"
              class="mWidth"
              autocomplete="off"
              placeholder="请输入"
            ></el-input>
          </el-form-item>
          <el-form-item label="快递公司：">
            <el-input
              v-model.trim="formData.name"
              class="mWidth"
              autocomplete="off"
              placeholder="请输入"
            ></el-input>
          </el-form-item>
          <el-form-item label="快递单号：">
            <el-input
              v-model.trim="formData.cardCode"
              class="mWidth"
              autocomplete="off"
              placeholder="请输入"
            ></el-input>
          </el-form-item>
          <el-form-item label="寄件凭证：">
            <uploadAnnex
              class="mWidth"
              @getFileList="getExpressFileList"
              :limitationFactor="limitationExpress"
              @getFile="getExpressFile"
              :upLoadFile="expressFile"
            />
          </el-form-item>
          <el-row v-model="formData.senderFileJson">
            <uploadResult
              style="margin-left: 135px !important"
              :resultList="expressFile"
              @callBackResult="getExpressFile"
            />
          </el-row>
        </div>
        <!-- 非资金存入及资金存入全额缴纳/部分缴纳有缴纳凭证 -->
        <template
          v-if="
            formData.method !== 'FUNDDEPOSIT' ||
            (formData.method === 'FUNDDEPOSIT' &&
              (formData.payMethod === 'ALL_PAY' ||
                formData.payMethod === 'PART_PAY'))
          "
        >
          <el-form-item
            :label="
              isHsUser() &&
              ['BANKGUARANTEE', 'BANKPOLICY'].includes(formData.method)
                ? '保单保函：'
                : '缴纳凭证：'
            "
            prop="contractImgUrl"
          >
            <uploadAnnex
              class="mWidth"
              @getFileList="getFileListPay"
              :limitationFactor="limitationFactorPay"
              @getFile="getFilePay"
              :upLoadFile="uploadPayFile"
            />
          </el-form-item>
          <el-row v-model="formData.contractImgUrl">
            <uploadResult
              style="margin-left: 135px !important"
              :resultList="uploadPayFile"
              @callBackResult="getFilePay"
            />
          </el-row>
        </template>
        <el-form-item
          v-if="
            isHsUser() &&
            ['BANKGUARANTEE', 'BANKPOLICY'].includes(formData.method)
          "
          label=""
          label-width="20px"
        >
          <el-checkbox v-model="formData.checked"
            >勾选即代表同意
            <el-link @click="downLoadFile('constructionFiles')"
              >施工单位承诺书</el-link
            ></el-checkbox
          >
        </el-form-item>
      </el-form>

      <span slot="footer" class="dialog-footer">
        <el-button
          class="cancel"
          @click.native="closeFormDialog('payFormVisible', 'formData')"
          >取 消</el-button
        >
        <el-button
          type="primary"
          class="save"
          @click.native="saveToDetail('formData', 'payFormVisible')"
          :loading="isSaveLoading"
          >确 定</el-button
        >
      </span>
    </el-dialog>
    <!-- 补缴详情弹窗 -->
    <el-dialog
      title="补缴记录详情"
      :visible.sync="supplyInfoVisible"
      width="640px"
      :close-on-click-modal="false"
      custom-class="dialog-minwidth"
      class="detailDialog"
      :modal-append-to-body="false"
    >
      <el-row class="labelWidthSty">
        <span class="gridContent color333 fontSizeF fontWeight"
          >补缴日期：</span
        >
        <span class="gridContent empContentSty color666 fontSizeF">{{
          supplyForm.date
        }}</span>
      </el-row>
      <el-row class="labelWidthSty">
        <span class="gridContent color333 fontSizeF fontWeight"
          >应补金额：</span
        >
        <span class="gridContent empContentSty color666 fontSizeF"
          >{{ supplyForm.shouldPay }}元（应缴总额 - 余额）</span
        >
      </el-row>
      <el-row class="labelWidthSty">
        <span class="gridContent color333 fontSizeF fontWeight"
          >实缴金额：</span
        >
        <span class="gridContent empContentSty color666 fontSizeF"
          >{{ supplyForm.actPay }}元</span
        >
      </el-row>
      <el-row class="labelWidthSty">
        <span class="gridContent color333 fontSizeF fontWeight"
          >业务办理人：</span
        >
        <span class="gridContent empContentSty color666 fontSizeF">{{
          supplyForm.operator || '--'
        }}</span>
      </el-row>
      <el-row class="labelWidthSty">
        <span class="gridContent color333 fontSizeF fontWeight"
          >缴纳凭证：</span
        >
        <span class="gridContent empContentSty color666 fontSizeF">
          <span v-if="supplyForm.uploadFile.length > 0">
            <span>已上传</span>
            <span class="seeFile" @click="toUploadFile()">查看</span>
            <contractEnclosureDialog
              v-if="uploadContract"
              dialogTitle="保证金缴纳凭证"
              :tableData="supplyForm.uploadFile"
              @closeDialog="hiddenDialog"
            ></contractEnclosureDialog>
          </span>
          <span v-else>未上传</span>
        </span>
      </el-row>
    </el-dialog>
    <!-- 动用详情弹窗 -->
    <el-dialog
      title="动用记录详情"
      width="640px"
      :visible.sync="expenditureInfoVisible"
      :close-on-click-modal="false"
      custom-class="dialog-minwidth"
      class="detailDialog"
      :modal-append-to-body="false"
    >
      <el-row class="labelWidthSty" style="margin-top: 8px">
        <span class="gridContent color333 fontSizeF fontWeight"
          >动用日期：</span
        >
        <span class="gridContent empContentSty color666 fontSizeF">{{
          expenditureForm.date
        }}</span>
      </el-row>
      <el-row class="labelWidthSty">
        <span class="gridContent color333 fontSizeF fontWeight"
          >可动用金额：</span
        >
        <span class="gridContent empContentSty color666 fontSizeF"
          >{{ expenditureForm.canPay }}元（余额）</span
        >
      </el-row>
      <el-row class="labelWidthSty">
        <span class="gridContent color333 fontSizeF fontWeight"
          >动用金额：</span
        >
        <span class="gridContent empContentSty color666 fontSizeF"
          >{{ expenditureForm.actPay }}元</span
        >
      </el-row>
      <el-row class="labelWidthSty">
        <span class="gridContent color333 fontSizeF fontWeight"
          >动用方式：</span
        >
        <span class="gridContent empContentSty color666 fontSizeF">{{
          expenditureForm.typeName
        }}</span>
      </el-row>
      <el-row class="labelWidthSty">
        <span class="gridContent color333 fontSizeF fontWeight"
          >收款账号：</span
        >
        <span class="gridContent empContentSty color666 fontSizeF"
          >{{ expenditureForm.accountTypeName
          }}{{ expenditureForm.accountNum }}</span
        >
      </el-row>
      <el-row class="labelWidthSty">
        <span class="gridContent color333 fontSizeF fontWeight"
          >业务办理人：</span
        >
        <span class="gridContent empContentSty color666 fontSizeF">{{
          expenditureForm.operator || '--'
        }}</span>
      </el-row>
      <el-row class="labelWidthSty">
        <span class="gridContent color333 fontSizeF fontWeight"
          >动用原因：</span
        >
        <span
          class="gridContent empContentSty color666 fontSizeF"
          style="width: calc(100% - 120px); line-height: 18px"
          >{{ expenditureForm.reason || '--' }}</span
        >
      </el-row>
      <el-row class="labelWidthSty">
        <span class="gridContent color333 fontSizeF fontWeight"
          >动用凭证：</span
        >
        <span class="gridContent empContentSty color666 fontSizeF">
          <!-- <div v-for="(item,index) of expenditureForm.uploadFile" :key="index">
                        <el-image style="width: 100px; height: 100px" :src="item.url" :preview-src-list="expenditureForm.srcList" @click="enlargeImg(index,'expenditureForm')"></el-image>
                    </div> -->
          <span v-if="expenditureForm.uploadFile.length > 0">
            <span>已上传</span>
            <span class="seeFile" @click="toUploadFileTwo()">查看</span>
            <contractEnclosureDialog
              v-if="uploadContractTwo"
              dialogTitle="保证金动用凭证"
              :tableData="expenditureForm.uploadFile"
              @closeDialog="hiddenDialogTwo"
            ></contractEnclosureDialog>
          </span>
          <span v-else>未上传</span>
        </span>
      </el-row>
    </el-dialog>
    <!-- 返还详情弹窗 -->
    <el-dialog
      title="返还记录详情"
      width="640px"
      :visible.sync="payBackInfoVisible"
      :close-on-click-modal="false"
      custom-class="dialog-minwidth"
      class="detailDialog"
      :modal-append-to-body="false"
    >
      <el-row class="labelWidthSty">
        <span class="gridcontent color333 fontsizef fontweight"
          >返还日期：</span
        >
        <span class="gridcontent empcontentsty color666 fontsizef">{{
          payBackForm.date
        }}</span>
      </el-row>
      <el-row class="labelWidthSty">
        <span class="gridcontent color333 fontsizef fontweight"
          >可返金额：</span
        >
        <span class="gridcontent empcontentsty color666 fontsizef"
          >{{ payBackForm.canPay }}元（余额）</span
        >
      </el-row>
      <el-row class="labelWidthSty">
        <span class="gridcontent color333 fontsizef fontweight"
          >返还金额：</span
        >
        <span class="gridcontent empcontentsty color666 fontsizef"
          >{{ payBackForm.actPay }}元</span
        >
      </el-row>
      <el-row class="labelWidthSty">
        <span class="gridcontent color333 fontsizef fontweight"
          >返还方式：</span
        >
        <span class="gridcontent empcontentsty color666 fontsizef">{{
          payBackForm.typeName
        }}</span>
      </el-row>
      <el-row class="labelWidthSty">
        <span class="gridcontent color333 fontsizef fontweight"
          >收款账号：</span
        >
        <span class="gridcontent empcontentsty color666 fontsizef"
          >{{ payBackForm.accountTypeName }}&nbsp;&nbsp;{{
            payBackForm.accountNum
          }}</span
        >
      </el-row>
      <el-row class="labelWidthSty">
        <span class="gridcontent color333 fontsizef fontweight"
          >业务办理人：</span
        >
        <span class="gridcontent empcontentsty color666 fontsizef">{{
          payBackForm.operator || '--'
        }}</span>
      </el-row>
      <el-row class="labelWidthSty">
        <span class="gridcontent color333 fontsizef fontweight">备注：</span>
        <span
          class="gridcontent empcontentsty color666 fontsizef"
          style="width: calc(100% - 70px); line-height: 18px"
          >{{ payBackForm.reason || '--' }}</span
        >
      </el-row>
      <el-row class="labelWidthSty">
        <span class="gridcontent color333 fontsizef fontweight"
          >返还凭证：</span
        >
        <span
          class="gridcontent empcontentsty color666 fontsizef"
          v-if="payBackForm.uploadFile.length > 0"
        >
          <!-- <div v-for="(item,index) of payBackForm.uploadFile" :key="index">
                        <el-image style="width: 100px; height: 100px" :src="item.url" :preview-src-list="payBackForm.srcList" @click="enlargeImg(index,'payBackForm')"></el-image>
                    </div> -->
          <span v-if="payBackForm.uploadFile.length > 0">
            <span>已上传</span>
            <span class="seeFile" @click="toUploadFileThree()">查看</span>
            <contractEnclosureDialog
              v-if="uploadContractThree"
              dialogTitle="保证金返还凭证"
              :tableData="payBackForm.uploadFile"
              @closeDialog="hiddenDialogThree"
            ></contractEnclosureDialog>
          </span>
          <span v-else>未上传</span>
        </span>
        <span class="gridcontent empcontentsty color666 fontsizef" v-else>
          未上传
        </span>
      </el-row>
    </el-dialog>
    <!-- 缴纳详情弹窗 -->
    <el-dialog
      title="缴纳记录详情"
      :visible.sync="payInfoVisible"
      :close-on-click-modal="false"
      custom-class="dialog-minwidth"
      class="detailDialog"
      width="660px"
      :modal-append-to-body="false"
    >
      <el-row class="labelWidthSty">
        <span class="gridContent color333 fontSizeF fontWeight"
          >项目名称：</span
        >
        <span
          class="gridContent empContentSty color666 fontSizeF"
          style="width: calc(100% - 120px); line-height: 18px"
          >{{ cashDepositInfo.projectName || '--' }}</span
        >
      </el-row>
      <el-row class="labelWidthSty">
        <span class="gridContent color333 fontSizeF fontWeight"
          >保证金缴纳方式：</span
        >
        <span class="gridContent empContentSty color666 fontSizeF"
          >资金存入</span
        >
      </el-row>
      <el-row class="labelWidthSty">
        <span class="gridContent color333 fontSizeF fontWeight"
          >缴纳形式：</span
        >
        <span class="gridContent empContentSty color666 fontSizeF">{{
          cashDepositInfo.payMethodDesc || '--'
        }}</span>
      </el-row>
      <el-row class="labelWidthSty">
        <span class="gridContent color333 fontSizeF fontWeight"
          >缴纳单位：</span
        >
        <span
          class="gridContent empContentSty color666 fontSizeF"
          v-if="companyType === '0'"
          >{{ payForm.payCompany }}&nbsp;&nbsp;（建设方）</span
        >
        <span class="gridContent empContentSty color666 fontSizeF" v-else
          >{{ payForm.payCompany }}&nbsp;&nbsp;（施工方）</span
        >
      </el-row>
      <el-row class="labelWidthSty">
        <span class="gridContent color333 fontSizeF fontWeight"
          >缴纳日期：</span
        >
        <span class="gridContent empContentSty color666 fontSizeF">{{
          payForm.date
        }}</span>
      </el-row>
      <!-- 资金存入-（全额缴纳/部分免缴）存在缴纳银行和缴纳账号信息 -->
      <el-row
        v-if="payMethod === 'ALL_PAY' || payMethod === 'PART_PAY'"
        class="labelWidthSty"
      >
        <span class="gridContent color333 fontSizeF fontWeight"
          >缴纳银行：</span
        >
        <span class="gridContent empContentSty color666 fontSizeF">{{
          payBank
        }}</span>
      </el-row>
      <el-row
        v-if="payMethod === 'ALL_PAY' || payMethod === 'PART_PAY'"
        class="labelWidthSty"
      >
        <span class="gridContent color333 fontSizeF fontWeight"
          >缴纳账号：</span
        >
        <span class="gridContent empContentSty color666 fontSizeF">{{
          payAccount
        }}</span>
      </el-row>
      <el-row class="labelWidthSty">
        <span class="gridContent color333 fontSizeF fontWeight"
          >应缴金额：</span
        >
        <span
          class="gridContent empContentSty color666 fontSizeF"
          v-if="!sectionType"
          >{{ payForm.shouldPay }}元（{{ projectTotal }}*{{
            scale
          }}%，最高限额{{ limit }}元）</span
        >
        <span
          v-else
          class="gridContent empContentSty color666 fontSizeF"
          style="width: calc(100% - 100px)"
        >
          <span :key="index" v-for="(item, index) in bondSettingConfig">
            <span v-if="item.sectionType == 1"
              >{{ item.shouldPay }}元 【
              <span
                v-for="(items, indexs) in item.depositConfigs"
                :key="indexs"
              >
                <span v-if="indexs == 0"
                  >{{ items.max * 10000 }}*{{ items.scale }}%
                  <span v-if="indexs < item.depositConfigs.length - 1"
                    >+</span
                  ></span
                >
                <span v-else>
                  <span v-if="item.total&lt;items.max*10000"
                    >({{ item.total }}-{{
                      item.depositConfigs[indexs - 1].max * 10000
                    }})*{{ items.scale }}%
                    <span v-if="indexs < item.depositConfigs.length - 1"
                      >+</span
                    ></span
                  >
                  <span v-else
                    >({{ items.max * 10000 }}-{{ items.min * 10000 }})*{{
                      items.scale
                    }}%
                    <span v-if="indexs < item.depositConfigs.length - 1"
                      >+</span
                    ></span
                  >
                </span> </span
              >,最高限额{{ item.upperLimit }}元】
            </span>
            <span v-else
              >{{ item.shouldPay }}元({{ item.total }}*{{
                item.depositConfig.scale
              }}%,最高限额{{ item.depositConfig.upperLimit }}元)</span
            >
          </span>
        </span>
      </el-row>
      <!-- 部分免缴 -->
      <el-row v-if="payMethod === 'PART_PAY'" class="labelWidthSty">
        <span class="gridContent color333 fontSizeF fontWeight"
          >减免金额：</span
        >
        <span class="gridContent empContentSty color666 fontSizeF"
          >{{ cashDepositInfo.exemptionAccount }}元
          <span style="color: red" v-if="loginType == 'JC' && checktips"
            >审核提示：根据最新信用评级及减免配置，当前最高可减免金额为“{{
              checktips
            }}”元</span
          ></span
        >
      </el-row>
      <!-- 免缴 -->
      <el-row v-if="payMethod === 'ALL_NO_PAY'" class="labelWidthSty">
        <span class="gridContent color333 fontSizeF fontWeight"
          >免缴金额：</span
        >
        <span class="gridContent empContentSty color666 fontSizeF"
          >{{ cashDepositInfo.exemptionAccount }}元</span
        >
      </el-row>

      <!-- 免缴 没有实缴金额 字段 -->
      <el-row v-if="payMethod !== 'ALL_NO_PAY'" class="labelWidthSty">
        <span class="gridContent color333 fontSizeF fontWeight"
          >实缴金额：</span
        >
        <span class="gridContent empContentSty color666 fontSizeF"
          >{{ payForm.actPay }}元</span
        >
      </el-row>
      <el-row class="labelWidthSty">
        <span class="gridContent color333 fontSizeF fontWeight"
          >业务办理人：</span
        >
        <span class="gridContent empContentSty color666 fontSizeF">{{
          payForm.operator || '--'
        }}</span>
      </el-row>
      <el-row class="labelWidthSty">
        <span class="gridContent color333 fontSizeF fontWeight">{{
          payMethod === 'ALL_PAY'
            ? '缴纳原因：'
            : payMethod === 'PART_PAY'
            ? '减免原因：'
            : '缓缴原因：'
        }}</span>
        <span
          class="gridContent empContentSty color666 fontSizeF"
          style="width: calc(100% - 120px); line-height: 18px"
          >{{ payForm.reason || '--' }}</span
        >
      </el-row>
      <!-- 资金存入-（全额缴纳/部分免缴）存在缴纳银行和缴纳账号信息 -->
      <div v-if="isHsUser()">
        <el-row class="labelWidthSty">
          <span class="gridContent color333 fontSizeF fontWeight"
            >付款银行账户：</span
          >
          <span
            class="gridContent empContentSty color666 fontSizeF"
            style="width: calc(100% - 105px); line-height: 18px"
            >填写企业付款银行账号，不支持个人账户转账，后期保证金退还将原路退回</span
          >
        </el-row>
        <el-row class="labelWidthSty">
          <span class="gridContent color333 fontSizeF fontWeight"
            >开户银行：</span
          >
          <span class="gridContent empContentSty color666 fontSizeF">{{
            payForm.institution || '--'
          }}</span>
        </el-row>
        <el-row class="labelWidthSty">
          <span class="gridContent color333 fontSizeF fontWeight"
            >支行名称：</span
          >
          <span class="gridContent empContentSty color666 fontSizeF">{{
            payForm.branch || '--'
          }}</span>
        </el-row>
        <el-row class="labelWidthSty">
          <span class="gridContent color333 fontSizeF fontWeight"
            >账户名称：</span
          >
          <span class="gridContent empContentSty color666 fontSizeF">{{
            payForm.name || '--'
          }}</span>
        </el-row>
        <el-row class="labelWidthSty">
          <span class="gridContent color333 fontSizeF fontWeight"
            >银行卡号：</span
          >
          <span class="gridContent empContentSty color666 fontSizeF">{{
            payForm.cardCode || '--'
          }}</span>
        </el-row>
      </div>
      <el-row
        v-if="payMethod === 'PART_PAY' || payMethod === 'WAIT_PAY'"
        class="labelWidthSty"
      >
        <span class="gridContent color333 fontSizeF fontWeight">{{
          payMethod === 'PART_PAY' ? '减免凭证：' : '缓缴凭证：'
        }}</span>
        <span class="gridContent empContentSty color666 fontSizeF">
          <span v-if="payForm.uploadFile.length > 0">
            <span>已上传</span>
            <span class="seeFile" @click="toUploadFile()">查看</span>
            <contractEnclosureDialog
              v-if="uploadContract"
              :dialogTitle="payMethod === 'PART_PAY' ? '减免凭证' : '缓缴凭证'"
              :tableData="payForm.uploadFile"
              @closeDialog="hiddenDialog"
            ></contractEnclosureDialog>
          </span>
          <span v-else>未上传</span>
        </span>
      </el-row>
      <!-- 全额缴存和部分免缴 -->
      <el-row
        v-if="payMethod === 'ALL_PAY' || payMethod === 'PART_PAY'"
        class="labelWidthSty"
      >
        <span class="gridContent color333 fontSizeF fontWeight"
          >缴纳凭证：</span
        >
        <span class="gridContent empContentSty color666 fontSizeF">
          <span v-if="payForm.uploadPayFile.length > 0">
            <span>已上传</span>
            <span class="seeFile" @click="toUploadFileTwo()">查看</span>
            <contractEnclosureDialog
              v-if="uploadContractTwo"
              dialogTitle="保证金缴纳凭证"
              :tableData="payForm.uploadPayFile"
              @closeDialog="hiddenDialogTwo"
            ></contractEnclosureDialog>
          </span>
          <span v-else>未上传</span>
        </span>
      </el-row>
    </el-dialog>
    <!-- 驳回申报弹框 -->
    <el-dialog
      title="驳回申报"
      :visible.sync="formVisibleReject"
      :close-on-click-modal="false"
      @close="closeDialog"
      custom-class="brand-dialog-min-width"
      width="550px"
      :modal-append-to-body="false"
    >
      <el-form
        :model="formDataReject"
        label-width="80px"
        :rules="formRulesReject"
        ref="formDataReject"
      >
        <el-form-item label="">
          请核对企业申报的保证金流水信息，如确实有误则将通知企业修改再次申报，本页面隐藏该流水，请谨慎操作
        </el-form-item>
        <el-form-item label="驳回原因" class="row-padding-bottom" prop="reason">
          <el-input
            type="textarea"
            :rows="3"
            v-model="formDataReject.reason"
            @blur="formDataReject.reason = changeValue($event)"
            maxlength="200"
            show-word-limit
          ></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click.native="handleClose" class="cancel">取消</el-button>
        <el-button
          type="primary"
          @click.native="submitRejectSave"
          v-sdc
          class="save"
          >保存</el-button
        >
      </div>
    </el-dialog>
  </div>
</template>

<script>
import uploadInputNew from '@/components/publicCom/uploadInputNew.vue'
export default {
  name: 'cashDepositPay',
  components: {
    uploadInputNew,
  },
  props: [
    'method', //缴纳方式
    'payMethod', //缴纳形式
    'depositId', //保证金id
    'projectId',
    'isJC',
  ],
  data() {
    var checkMoneyB = (rule, value, callback) => {
      value = value.toString().replace(/\s+/g, '')
      if (value === '') {
        return callback(new Error('金额不能为空'))
      } else {
        var rePayTotal =
          /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/
        if (!rePayTotal.test(value) || value == 0.0 || value == 0.0) {
          callback(new Error('金额格式不正确,必须大于0,最多带有2位小数'))
        } else {
          if (value >= 100000000000) {
            callback(new Error('金额需小于1000亿'))
          } else {
            callback()
          }
        }
      }
    }
    var checkMoney = (rule, value, callback) => {
      if (!value) {
        if (
          this.formData.method === 'BANKGUARANTEE' ||
          this.formData.method === 'OWNERPOLICY' ||
          this.formData.method === 'BANKPOLICY'
        ) {
          return callback(new Error('担保金额不能为空'))
        } else if (
          this.formData.method === 'FUNDDEPOSIT' &&
          this.formData.payMethod === 'ALL_PAY'
        ) {
          return callback(new Error('实缴金额不能为空'))
        }
      } else {
        var rePayTotal =
          /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/
        if (!rePayTotal.test(value) || value == 0.0 || value == 0.0) {
          callback(new Error('金额格式不正确,必须大于0,最多带有2位小数'))
        } else {
          if (value >= 100000000000) {
            callback(new Error('金额需小于1000亿'))
          } else {
            callback()
          }
        }
      }
    }
    var checkShouldPay = (rule, value, callback) => {
      if (!this.formDataShouldPay) {
        return callback(new Error('应缴金额不能为空'))
      } else {
        callback()
      }
    }
    var checkMoneyReduce = (rule, value, callback) => {
      let shouldPay = this.formDataShouldPay.split('-')[0]
      if (!value && value != 0) {
        return callback(new Error('减免金额不能为空'))
      } else {
        var rePayTotal =
          /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/
        if (!rePayTotal.test(value) || value == 0.0 || value == 0.0) {
          callback(new Error('金额格式不正确,必须大于0,最多带有2位小数'))
        } else if (!shouldPay) {
          callback(new Error('请先选择应缴金额'))
        } else if (
          shouldPay &&
          (Number(value) > Number(shouldPay) ||
            Number(value) == Number(shouldPay))
        ) {
          callback(new Error('减免金额需小于应缴金额'))
        } else {
          callback()
        }
      }
    }
    var checkPayDate = (rule, value, callback) => {
      if (!value) {
        if (
          this.formData.method === 'FUNDDEPOSIT' &&
          this.formData.payMethod === 'WAIT_PAY'
        ) {
          return callback(new Error('缓缴日期不能为空'))
        } else {
          return callback(new Error('缴纳日期不能为空'))
        }
      } else {
        callback()
      }
    }
    var checkDate = (rule, value, callback) => {
      var guaranteeStartDate = this.formData.guaranteeStartDate
      var guaranteeEndDate = this.formData.guaranteeEndDate
      if (!guaranteeEndDate) {
        return callback(new Error('保函/担保到期的日期不能为空'))
      } else if (guaranteeStartDate > guaranteeEndDate) {
        return callback(new Error('担保到期日不能小于担保生效日'))
      } else {
        callback()
      }
    }

    var checkPayUploadFile = (rule, value, callback) => {
      if (this.uploadPayFile.length === 0) {
        if (
          this.isHsUser() &&
          ['BANKGUARANTEE', 'BANKPOLICY'].includes(this.formData.method)
        ) {
          return callback(new Error('保单保函不能为空'))
        } else {
          return callback(new Error('缴纳凭证不能为空'))
        }
      } else {
        callback()
      }
    }
    var checkExpressFile = (rule, value, callback) => {
      if (this.expressFile.length === 0) {
        return callback(new Error('寄件凭证不能为空'))
      } else {
        callback()
      }
    }
    var checkReason = (rule, value, callback) => {
      if (!value && this.formData.method === 'FUNDDEPOSIT') {
        if (this.formData.payMethod === 'PART_PAY') {
          return callback(new Error('减免原因不能为空'))
        } else if (this.formData.payMethod === 'ALL_NO_PAY') {
          return callback(new Error('免缴原因不能为空'))
        } else if (this.formData.payMethod === 'WAIT_PAY') {
          return callback(new Error('缓缴原因不能为空'))
        }
      } else {
        callback()
      }
    }
    var checkUploadFileReduce = (rule, value, callback) => {
      if (this.upLoadFile.length === 0) {
        if (this.formData.method === 'FUNDDEPOSIT') {
          if (this.formData.payMethod === 'PART_PAY') {
            return callback(new Error('减免凭证不能为空'))
          } else if (this.formData.payMethod === 'ALL_NO_PAY') {
            return callback(new Error('免缴凭证不能为空'))
          } else if (this.formData.payMethod === 'WAIT_PAY') {
            return callback(new Error('缓缴凭证不能为空'))
          }
        }
      } else {
        callback()
      }
    }
    return {
      checktips: '',
      currentObjAreaId: '',
      currentObjTotal: '',
      projectOptions: [], //项目名称下拉框
      companyOptions: [], //缴纳单位
      formDataShouldPay: '',
      bankNameList: [],
      calculatePayTotal: '', //部分免缴计算的实缴
      formData: {
        projectName: '',
        projectJson: '',
        projectId: '', //项目名称
        method: 'FUNDDEPOSIT', //缴纳方式
        payMethod: 'ALL_PAY', //缴纳形式
        reciveunit: '', //缴纳单位
        operationDate: '', //缴纳日期
        guaranteeStartDate: '', //担保生效日
        guaranteeEndDate: '', //担保到期日
        bankOne: '', //缴纳银行
        bankId: '', //缴纳银行
        bankName: '',
        account: '通过选择银行带入', //缴纳账号
        shouldPay: '', //应缴金额
        total: '', //工程造价
        scale: '', //工程造价比例
        upperLimit: '', //最高限额
        reduceMoney: '', //减免金额
        payTotal: '', //实缴金额
        guaranteeName: '', //担保机构
        operator: '', //业务办理人
        remark: '', //缴纳原因
        reduceRemark: '', //减免原因
        contractImgUrl: [], //合同附件
      },
      noBank: false,
      upLoadFile: [], //附件
      cardFile: [],
      srcList: [],
      oldSrcList: [],
      uploadPayFile: [],
      paySrcList: [],
      oldPaySrcList: [],
      //验证
      formRules: {
        method: [
          {
            required: true,
            message: '请选择缴纳方式',
            trigger: ['blur', 'change'],
          },
        ],
        payMethod: [
          {
            required: true,
            message: '请选择缴纳形式',
            trigger: ['blur', 'change'],
          },
        ],
        reciveunit: [
          {
            required: true,
            message: '请选择缴纳单位',
            trigger: 'change',
          },
        ],
        operationDate: [
          {
            required: true,
            // message: "日期不能为空",
            validator: checkPayDate,
            trigger: 'change',
          },
        ],
        bankOne: [
          {
            required: true,
            message: '请选择缴纳银行',
            trigger: 'change',
          },
        ],
        operator: [
          {
            // pattern: /^[^\u4e00-\u9fa5]{0,}$/,
            pattern: /^[\u4e00-\u9fa5]+$/,
            message: '只能输入汉字',
            trigger: 'blur',
          },
        ],
        reduceMoney: [
          {
            required: true,
            validator: checkMoneyReduce,
            // message: "减免金额不能为空",
            trigger: 'blur',
          },
        ],
        payTotal: [
          {
            required: true,
            validator: checkMoney,
            trigger: 'blur',
          },
        ],
        shouldPay: [
          {
            required: true,
            validator: checkShouldPay,
            // message: "应缴金额不能为空",
            trigger: 'blur',
          },
        ],
        guaranteeName: [
          {
            required: true,
            message: '担保机构不能为空',
            trigger: 'blur',
          },
        ],
        guaranteeStartDate: [
          {
            required: true,
            message: '保函/担保生效的日期不能为空',
            trigger: 'change',
          },
        ],
        guaranteeEndDate: [
          {
            required: true,
            validator: checkDate,
            // message: "保函/担保到期的日期不能为空",
            trigger: 'change',
          },
        ],
        reduceRemark: [
          {
            required: true,
            // message: "原因不能为空",
            validator: checkReason,
            trigger: 'blur',
          },
        ],
        reducePayImg: [
          {
            required: true,
            validator: checkUploadFileReduce,
            trigger: 'change',
          },
        ],
        contractImgUrl: [
          {
            required: true,
            // message: "缴纳凭证不能为空",
            validator: checkPayUploadFile,
            trigger: 'change',
          },
        ],
      },
      isSaveLoading: false, // 保存loading
      total: 0,
      showForm: true, //重新渲染表单，避免验证问题
      cashDepositInfo: '', //保证金信息
      approvalStatus: '', //审核状态（已审核可以点击补缴，动用，返还）
      payUnit: '', //缴纳单位
      payUnitUscc: '', //缴纳单位Id
      companyJS: '', //建设方
      companySG: '', //施工方
      companyJSUscc: '', //建设方Id
      companySGUscc: '', //施工方Id
      companyType: '', //缴纳单位类型 0建设方 5施工方
      payBank: '', //缴纳银行
      payAccount: '', //缴纳账号 （工资专户账号）
      shouldSupply: 0, //应补缴金额
      deposit: {
        balance: 0, //余额
        actPay: 0, //实缴保证金,
      },
      // 状态（ DEPOSIT -已缴存，RETURN -已退回，DATESTART -已生效，DATEEND -已失效
      state: '', //保证金缴纳状态
      scale: '', //应缴金额比例
      limit: '', //最高限额
      projectTotal: '', //{{projectTotal}}
      requestUrl: 'api-d/accass/expand/accasslist', //表格请求路径
      filterField: {
        projectId: '',
      },
      pageSizes: [5],
      currentPage: 1,
      pageSize: 5,
      tableData: [],
      loading: true,
      isShow: false,
      supplyForm: {
        //补缴表单
        bankOne: '',
        bankId: '',
        bankName: '',
        account: '',
        date: '', //补缴日期
        shouldPay: '',
        actPay: '', //实缴金额,
        operator: '', //业务办理人
        uploadForm: 'supplyUploadForm',
        srcList: [], //上传图片
        oldSrcList: [], //上传图片预览图片数组
        uploadInput: 'supplyUploadInput',
        uploadFile: [],
      },
      salaryExcelForm: 'salaryExcelForm',
      supplyFormVisible: false,
      supplyFormRule: {
        //补缴表单验证
        date: [
          {
            required: true,
            message: '请选择保证金补缴的日期',
            trigger: 'blur',
          },
        ],
        actPay: [{ required: true, validator: checkMoneyB, trigger: 'blur' }],
      },
      payImageUrl: '', //补缴表单上传图片
      payImageDialog: false,
      isLoading: false, //确定按钮loading
      supplyInfoVisible: false, //补缴详情
      expenditureInfoVisible: false, //动用详情
      payBackInfoVisible: false, //返回详情
      payInfoVisible: false, //缴纳详情
      canPay: '', //可动用，可返还
      expenditureForm: {
        //动用表单
        date: '', //日期
        canPay: '', //可动用
        actPay: '', //动用
        payType: 'TRANSFER',
        typeName: '',
        accountType: '', //收款账号(ACCOUNT:工资专户；OTHER:其他)
        accountNum: '', //账号
        accountTypeName: '',
        operator: '',
        reason: '',
        uploadForm: 'expenditureUploadForm',
        srcList: [], //上传图片
        oldSrcList: [], //上传图片预览图片数组
        uploadInput: 'expenditureUploadInput',
        uploadFile: [],
      },
      expenditureFormVisible: false,
      expenditureFormRule: {
        //动用表单验证
        date: [
          {
            required: true,
            message: '请选择保证金动用的日期',
            trigger: 'blur',
          },
        ],
        actPay: [{ required: true, validator: checkMoneyB, trigger: 'blur' }],
        accountType: [
          {
            required: true,
            message: '请选择收款账号',
            trigger: 'blur',
          },
        ],
        accountNum: [
          {
            required: true,
            pattern: /^[^\u4e00-\u9fa5]{0,}$/,
            message: '请输入正确格式的账号',
            // pattern: /^\d{15,19}$/,
            // message: "请输入15-19 位纯数字的银行卡号",
            trigger: 'blur',
          },
        ],
        payType: [
          {
            required: true,
            message: '请选择返还类型',
            trigger: 'blur',
          },
        ],
        reason: [
          {
            min: 1,
            max: 200,
            required: true,
            message: '请填写动用原因',
            trigger: 'blur',
          },
        ],
      },
      payBackForm: {
        //返还表单
        date: '',
        canPay: '', //可返还
        actPay: '',
        payType: 'TRANSFER',
        typeName: '',
        accountType: '',
        accountName: '',
        accountNum: '',
        operator: '',
        reason: '',
        uploadForm: 'payBackUploadForm',
        srcList: [], //上传图片
        oldSrcList: [], //上传图片预览图片数组
        uploadInput: 'payBackUploadInput',
        uploadFile: [],
      },
      payBackFormVisible: false,
      payBackFormRule: {
        //返还表单验证
        date: [
          {
            required: true,
            message: '请选择保证金返还的日期',
            trigger: 'blur',
          },
        ],
        actPay: [{ required: true, validator: checkMoneyB, trigger: 'blur' }],
        accountNum: [
          {
            required: true,
            pattern: /^[^\u4e00-\u9fa5]{0,}$/,
            message: '请输入正确格式的账号',
            trigger: 'blur',
          },
        ],
        payType: [
          {
            required: true,
            message: '请选择返还类型',
            trigger: 'blur',
          },
        ],
        accountType: [
          {
            required: true,
            message: '请选择收款账号',
            trigger: 'blur',
          },
        ],
      },
      payForm: {
        //缴纳表单
        companyUscc: '', //缴纳单位Id
        payCompany: '', //缴纳单位名称
        date: '',
        shouldPay: '', //应缴金额
        actPay: '',
        operator: '',
        reason: '',
        uploadForm: 'payUploadForm',
        uploadPayFile: [],
        paySrcList: [],
        oldPaySrcList: [],
        srcList: [], //上传图片
        oldSrcList: [], //上传图片预览图片数组
        uploadInput: 'payUploadInput',
        uploadFile: [],
      },
      payFormVisible: false,
      payFormRule: {
        //缴纳表单验证
        date: [
          {
            required: true,
            message: '请选择保证金缴存的日期',
            trigger: 'blur',
          },
        ],
        actPay: [{ required: true, validator: checkMoneyB, trigger: 'blur' }],
      },
      //上传图片的变量
      uploadUrl: 'api-f/files/upload', //上传图片路径
      updateId: '', //修改流水的id
      eventType: 'add',
      //日期选择范围限制
      pickerOptions: {
        disabledDate(time) {
          return time.getTime() > Date.now()
        },
      },
      isShowUpdate: '',
      isShowDel: '',
      loginType: '',
      amountPayableList: [],
      formVisibleReject: false, //驳回申报弹框
      depositAccassId: '', //流水id
      formDataReject: {
        reason: '',
      },
      formRulesReject: {
        reason: [
          {
            required: true,
            message: '请输入驳回原因',
            trigger: 'change',
          },
        ],
      },
      isDisabled: false,
      currentProjectAreaId: '', //当前项目区域id
      currentProjectTotal: '', //当前项目total
      uploadContract: false,
      uploadContractTwo: false,
      uploadContractThree: false,
      // 补缴
      limitationFactorSupply: {
        uploadAnnexUrl: 'api-f/files/upload', //自定义上传文件接口地址
        upLoadFileLength: 10, //自定义上传附件的个数设置
        fileSize: 5, //自定义上传文件最大设置
        formatType: 'typeFour', //自定义上传格式校验类型
        fileId: 'supply', //自定义id解决一个页面包含多个上传附件
        uploadFormId: 'supplyForm', //自定义id解决一个页面包含多个上传附件
        messagetip:
          '要求格式为png，jpg，jpeg，doc，docx，xls，xlsx，pdf格式，附件大小不超过5M', //自定义报错提示语
        methodTip:
          '请上传缴款回执单，附件格式支持png，jpg，jpeg，doc，docx，xls，xlsx，pdf，最多上传10个附件', //自定义上传文件提示
        uploadBtnType: 'typeOne', //自定义上传按钮类型
      },
      // 动用
      limitationFactorExpend: {
        uploadAnnexUrl: 'api-f/files/upload', //自定义上传文件接口地址
        upLoadFileLength: 10, //自定义上传附件的个数设置
        fileSize: 5, //自定义上传文件最大设置
        formatType: 'typeFour', //自定义上传格式校验类型
        fileId: 'expenditure', //自定义id解决一个页面包含多个上传附件
        uploadFormId: 'expenditureForm', //自定义id解决一个页面包含多个上传附件
        messagetip:
          '要求格式为png，jpg，jpeg，doc，docx，xls，xlsx，pdf格式，附件大小不超过5M', //自定义报错提示语
        methodTip:
          '请上传欠薪认定书、工资发放花名册签字附件，附件格式支持png，jpg，jpeg，doc，docx，xls，xlsx，pdf，最多上传10个附件', //自定义上传文件提示
        uploadBtnType: 'typeOne', //自定义上传按钮类型
      },
      //返还
      limitationFactorPayBack: {
        uploadAnnexUrl: 'api-f/files/upload', //自定义上传文件接口地址
        upLoadFileLength: 10, //自定义上传附件的个数设置
        fileSize: 5, //自定义上传文件最大设置
        formatType: 'typeFour', //自定义上传格式校验类型
        fileId: 'payBack', //自定义id解决一个页面包含多个上传附件
        uploadFormId: 'payBackForm', //自定义id解决一个页面包含多个上传附件
        messagetip:
          '要求格式为png，jpg，jpeg，doc，docx，xls，xlsx，pdf格式，附件大小不超过5M', //自定义报错提示语
        methodTip:
          '请上传《工资支付保障金支付（结算）申请表》已签章附件，附件格式支持png，jpg，jpeg，doc，docx，xls，xlsx，pdf，最多上传10个附件', //自定义上传文件提示
        uploadBtnType: 'typeOne', //自定义上传按钮类型
      },
      limitationFactor: {
        uploadAnnexUrl: 'api-f/files/upload', //自定义上传文件接口地址
        upLoadFileLength: 10, //自定义上传附件的个数设置
        fileSize: 5, //自定义上传文件最大设置
        formatType: 'typeFour', //自定义上传格式校验类型
        fileId: 'salaryExcel', //自定义id解决一个页面包含多个上传附件
        uploadFormId: 'salaryExcelForm', //自定义id解决一个页面包含多个上传附件
        messagetip:
          '要求格式为png，jpg，jpeg，doc，docx，xls，xlsx，pdf格式，附件大小不超过5M', //自定义报错提示语
        methodTip: '', //自定义上传文件提示
        uploadBtnType: 'typeOne', //自定义上传按钮类型
      },
      limitationFactorPay: {
        uploadAnnexUrl: 'api-f/files/upload', //自定义上传文件接口地址
        upLoadFileLength: 10, //自定义上传附件的个数设置
        fileSize: 5, //自定义上传文件最大设置
        formatType: 'typeFour', //自定义上传格式校验类型
        fileId: 'salaryExcel1', //自定义id解决一个页面包含多个上传附件
        uploadFormId: 'salaryExcelForm1', //自定义id解决一个页面包含多个上传附件
        messagetip:
          '要求格式为png，jpg，jpeg，doc，docx，xls，xlsx，pdf格式，附件大小不超过5M', //自定义报错提示语
        methodTip: '', //自定义上传文件提示
        uploadBtnType: 'typeOne', //自定义上传按钮类型
      },
      //分段累加时使用
      bondSettingConfig: [],
      sectionType: 0,

      checkExpressFile,
      expressFile: [],
      expressSrcList: [],
      oldExpressSrcList: [],
      limitationExpress: {
        uploadAnnexUrl: 'api-f/files/upload', //自定义上传文件接口地址
        upLoadFileLength: 10, //自定义上传附件的个数设置
        fileSize: 5, //自定义上传文件最大设置
        formatType: 'typeFour', //自定义上传格式校验类型
        fileId: 'salaryExcel2', //自定义id解决一个页面包含多个上传附件
        uploadFormId: 'salaryExcelForm2', //自定义id解决一个页面包含多个上传附件
        messagetip:
          '要求格式为png，jpg，jpeg，doc，docx，xls，xlsx，pdf格式，附件大小不超过5M', //自定义报错提示语
        methodTip:
          '请上寄件凭证，附件格式支持png，jpg，jpeg，doc，docx，xls，xlsx，pdf，最多上传10个附件', //自定义上传文件提示
        uploadBtnType: 'typeOne', //自定义上传按钮类型
      },
    }
  },
  created() {
    //获取保证金列表跳转过来的保证金id
    this.id = this.$route.query.id
    //获取项目Id
    this.filterField.projectId = this.projectId
      ? this.projectId
      : this.$route.query.projectId
    this.loginType = localStorage.getItem('loginType')
    if (this.loginType === 'JC') {
      this.isDisabled = true
    }
    //加载保证金详情
    this.loadDetail()
    this.$nextTick(function () {
      this.$refs.pagination.getTableListData()
    })
    this.isShowAdd =
      this.$store.state.buttonLimitsArr.indexOf('depositList:add') > -1 ||
      this.$store.state.buttonLimitsArr.indexOf('mDepositList:add') > -1
    this.isShowUpdate =
      this.$store.state.buttonLimitsArr.indexOf('depositList:update') > -1 ||
      this.$store.state.buttonLimitsArr.indexOf('mDepositList:update') > -1
    this.isShowDel =
      this.$store.state.buttonLimitsArr.indexOf('depositList:delete') > -1 ||
      this.$store.state.buttonLimitsArr.indexOf('mDepositList:delete') > -1
  },
  methods: {
    downLoadFile(type) {
      this.axios({
        method: 'post',
        url: 'api-p/deposit/expand/findurl',
        data: {
          type: type,
        },
      })
        .then(
          (response) => {
            if (!response.data.hasError) {
              window.open(response.data.result.url)
            } else {
              this.$message({
                type: 'error',
                message: response.data.msg,
              })
            }
          },
          (response) => {}
        )
        .catch((error) => {})
    },
    changeBankName1(val) {
      console.log(val)
      // 获取选中的银行卡号
      var bankOne = val.split(',')
      this.supplyForm.bankId = bankOne[0]
      this.supplyForm.account = bankOne[1]
      this.supplyForm.bankName = bankOne[2]
    },
    //获取提示
    async getchecktips() {
      const projectInfos = await this.axios.post(
        'api-p/project/expand/projectdetail',
        { projectId: this.projectId }
      )
      if (this.isJC) {
        this.getBankNameList(projectInfos.data.result.areaId)
      }
      let params = {
        areaId: projectInfos.data.result.areaId,
        projectId: this.projectId,
        shouldPay: this.cashDepositInfo.shouldPayTotal * 10000,
      }
      this.axios
        .post('api-d/depositpayconfig/expand/checkTip', params)
        .then((res) => {
          if (!res.data.hasError) {
            this.checktips = res.data.result.freePayTotal
          } else {
            this.checktips = ''
          }
        })
    },
    /**
     * @description: 应缴金额选择
     */
    agreeChange() {
      this.changeCount()
    },
    //加载保证金详情
    loadDetail() {
      this.axios({
        method: 'post',
        url: 'api-d/deposit/expand/detail',
        data: {
          id: this.depositId,
        },
      })
        .then(
          (res) => {
            var data = res.data.result
            this.cashDepositInfo = data
            this.approvalStatusDesc = data.approvalStatusDesc
            this.loadDetailInfo(res)
            this.getchecktips()
          },
          (res) => {
            this.$message({
              message: '加载详情失败',
              type: 'error',
            })
          }
        )
        .catch((error) => {})
    },
    //获取保证金配置
    getBondSetting(areaId, total, depositType) {
      this.axios
        .post('api-d/deposit/expand/countshould', {
          areaId,
          total,
          depositType,
        })
        .then((res) => {
          this.bondSettingConfig = res.data.result
          this.sectionType = this.bondSettingConfig[0].sectionType
        })
    },
    //详情赋值
    loadDetailInfo(res) {
      const result = res.data.result
      this.payBank = result.bankName //银行
      this.payAccount = result.account //账号
      this.deposit.shouldPay = result.shouldPayTotal //应缴金额
      this.deposit.balance = result.balance //余额
      this.deposit.actPay = result.payTotal //实缴
      this.state = result.status //项目状态
      this.companyJSUscc = result.ownerUscc
      this.companySGUscc = result.contractorUscc
      this.companyJS = result.ownerName
      this.companySG = result.contractorName
      this.scale = result.payScale //缴存比例
      this.limit = result.upperLimit //限额
      this.projectTotal = result.projectTotal //造价
      this.shouldSupply = result.appendPay //应补缴金额
      this.companyType = result.companyType
      if (this.companyType === '0') {
        //建设方
        this.payUnit = result.ownerName //缴纳单位名称
        this.payUnitUscc = result.contractorUscc //缴纳单位的uscc
      }
      if (this.companyType === '5') {
        //施工方
        this.payUnit = result.contractorName //缴纳单位名称
        this.payUnitUscc = result.ownerUscc //缴纳单位的uscc
      }
      // 黄石地区
      if (this.isHsUser()) {
        this.$set(this.payForm, 'institution', result.institution)
        this.$set(this.payForm, 'branch', result.branch)
        this.$set(this.payForm, 'name', result.name)
        this.$set(this.payForm, 'cardCode', result.cardCode)
      }
      this.canPay = result.realBalance //可动用
    },
    //加载列表
    getTableList(data) {
      this.tableData = data
      this.loading = false
      if (this.tableData.length < 1) {
        this.isShow = true
      }
    },
    //补缴添加
    supplyOperate() {
      //当首次缴纳待审核/已撤回/已驳回，三个按钮均不可点击
      //当保证金已返还，三个按钮均不可点击
      //当保证金余额<应缴，可点击补缴
      if (
        this.approvalStatusDesc === '待审核' ||
        this.approvalStatusDesc === '已撤回' ||
        this.approvalStatusDesc === '已驳回'
      ) {
        this.$message.error(
          '您有一条' + this.approvalStatusDesc + '的缴纳流水，请先申报'
        )
      } else if (this.state === 'RETURN') {
        this.$message.error('当前保证金状态为已返还，无法添加流水')
      } else if (this.shouldSupply <= 0) {
        //appendPay
        this.$message.error('当前保证金已足额缴纳，无需补缴')
      } else {
        this.supplyFormVisible = true
        this.eventType = 'add'
        this.$nextTick(() => {
          //重置上传组件数据
          this.resetForm('supplyForm')
        })
        this.supplyForm.srcList = []
        this.supplyForm.oldSrcList = []
        this.supplyForm.uploadFile = []

        //首次补缴
        if (this.tableData.length == 0) {
          if (!this.isJC) {
            this.getBankNameList(this.$store.state.projectAreaId)
          }
        }
        this.supplyForm.shouldPay = this.shouldSupply
      }
    },
    //动用添加
    expenditureOperate() {
      if (
        this.approvalStatusDesc === '待审核' ||
        this.approvalStatusDesc === '已撤回' ||
        this.approvalStatusDesc === '已驳回'
      ) {
        this.$message.error(
          '您有一条' + this.approvalStatusDesc + '的缴纳流水，请先申报'
        )
      } else if (this.state === 'RETURN') {
        this.$message.error('当前保证金状态为已返还，无法添加流水')
      } else if (this.canPay == 0) {
        //余额
        this.$message.error('当前保证金余额为0，无法动用')
      } else {
        this.eventType = 'add'
        this.resetForm('expenditureForm')
        //重置上传组件数据
        this.expenditureForm.srcList = []
        this.expenditureForm.oldSrcList = []
        this.expenditureForm.uploadFile = []
        this.expenditureFormVisible = true
        this.expenditureForm.canPay = this.canPay //可动用
      }
    },
    //返还添加
    payBackOperate() {
      if (
        this.approvalStatusDesc === '待审核' ||
        this.approvalStatusDesc === '已撤回' ||
        this.approvalStatusDesc === '已驳回'
      ) {
        this.$message.error(
          '您有一条' + this.approvalStatusDesc + '的缴纳流水，请先申报'
        )
      } else if (this.state === 'RETURN') {
        this.$message.error('当前保证金状态为已返还，无法添加流水')
      } else if (this.canPay == 0) {
        //余额
        this.$message.error('当前保证金余额为0，无法返还')
      } else {
        this.eventType = 'add'
        //重置上传组件数据
        this.payBackForm.srcList = []
        this.payBackForm.oldSrcList = []
        this.payBackForm.uploadFile = []
        this.resetForm('payBackForm')
        this.payBackFormVisible = true
        this.payBackForm.canPay = this.canPay //可返还
      }
    },
    //撤回
    toRecallEvent(id, type) {
      this.$confirm(
        '撤回后劳动监察无法查看本条流水，且不计入统计，请及时修改并重新申报，或删除处理，是否确认撤回？',
        '提示',
        {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning',
        }
      )
        .then(() => {
          this.recall(id, type)
        })
        .catch(() => {})
    },
    // 确认撤回
    recall(id, type) {
      this.axios({
        method: 'post',
        url: 'api-d/deposit/expand/depositrecall',
        data: {
          depositId: this.depositId,
          depositAccassId: id,
        },
      })
        .then(
          (res) => {
            if (!res.data.hasError) {
              this.$message({
                type: 'success',
                message: '撤回成功!',
              })
              this.$nextTick(() => {
                this.$router.push({
                  path: '/home/cashDeposit/cashDepositList',
                  name: 'cashDepositList',
                })
              })
              this.$refs.pagination.getTableListData()
            } else {
              this.$message({
                type: 'error',
                message: res.data.errorMsg,
              })
            }
          },
          (response) => {
            this.$message({
              type: 'error',
              message: '数据请求失败',
            })
          }
        )
        .catch((res) => {})
    },
    //查看详情（返回+补缴+动用+缴纳）
    detailEvent(id, type) {
      this.axios({
        method: 'post',
        url: 'api-d/accass/expand/accassdetail',
        data: {
          id: id,
        },
      })
        .then(
          (res) => {
            const result = res.data.result
            if (type === 'APPENDED') {
              this.supplyInfoVisible = true
              this.loadSupplyDetail(result)
            }
            if (type === 'EXPENDED') {
              this.expenditureInfoVisible = true
              this.loadExpenditureDetail(result)
            }
            if (type === 'RETURNED') {
              this.payBackInfoVisible = true
              this.loadPayBackDetail(result)
            }
            if (type === 'PAID') {
              this.payInfoVisible = true
              this.loadPayDetail(result)
              this.getCashDepositInfo()
            }
          },
          (res) => {
            this.$message({
              message: '加载详情失败',
              type: 'error',
            })
          }
        )
        .catch((error) => {})
    },
    //补缴详情
    loadSupplyDetail(result) {
      this.supplyForm.date = result.operationDate
      this.supplyForm.shouldPay = result.lastTotal
      this.supplyForm.actPay = result.total
      this.supplyForm.operator = result.operator
      this.supplyForm.uploadFile = result.file
      for (var i = 0; i < this.supplyForm.uploadFile.length; i++) {
        this.supplyForm.srcList.push(this.supplyForm.uploadFile[i].url)
        this.supplyForm.oldSrcList.push(this.supplyForm.uploadFile[i].url)
      }
    },
    //动用详情
    loadExpenditureDetail(result) {
      this.expenditureForm.date = result.operationDate
      //this.shouldSupply = result.lastTotal;
      this.expenditureForm.canPay = result.lastTotal
      this.expenditureForm.actPay = result.total
      this.expenditureForm.payType = result.method
      this.expenditureForm.typeName = result.methodDesc
      this.expenditureForm.accountType = result.transferInType
      this.expenditureForm.accountTypeName = result.transferDesc
      this.expenditureForm.accountNum = result.transferInAcc
      this.expenditureForm.operator = result.operator
      this.expenditureForm.reason = result.reason
      this.expenditureForm.uploadFile = result.file
      for (var i = 0; i < this.expenditureForm.uploadFile.length; i++) {
        this.expenditureForm.srcList.push(
          this.expenditureForm.uploadFile[i].url
        )
        this.expenditureForm.oldSrcList.push(
          this.expenditureForm.uploadFile[i].url
        )
      }
    },
    //返还详情
    loadPayBackDetail(result) {
      this.payBackForm.date = result.operationDate
      //this.shouldSupply = result.lastTotal;
      this.payBackForm.canPay = result.lastTotal
      this.payBackForm.actPay = result.total
      this.payBackForm.payType = result.method
      this.payBackForm.typeName = result.methodDesc
      this.payBackForm.accountType = result.transferInType
      this.payBackForm.accountTypeName = result.transferDesc
      this.payBackForm.accountNum = result.transferInAcc
      this.payBackForm.operator = result.operator
      this.payBackForm.reason = result.reason
      this.payBackForm.uploadFile = result.file
      for (var i = 0; i < this.payBackForm.uploadFile.length; i++) {
        this.payBackForm.srcList.push(this.payBackForm.uploadFile[i].url)
        this.payBackForm.oldSrcList.push(this.payBackForm.uploadFile[i].url)
      }
    },
    //缴纳详情
    loadPayDetail(result) {
      this.payForm.payCompany = this.payUnit
      this.payForm.companyUscc = this.payUnitUscc
      this.payForm.date = result.operationDate
      this.payForm.shouldPay = result.shouldPayTotal
      this.payForm.actPay = result.total
      this.payForm.operator = result.operator
      this.payForm.reason = result.reason
      this.payForm.uploadPayFile = result.file
      //缴纳凭证
      for (var i = 0; i < this.payForm.uploadPayFile.length; i++) {
        this.payForm.paySrcList.push(this.payForm.uploadPayFile[i].url)
        this.payForm.oldPaySrcList.push(this.payForm.uploadPayFile[i].url)
      }
      //修改弹框缴纳凭证
      this.uploadPayFile = result.file
      for (var i = 0; i < this.uploadPayFile.length; i++) {
        this.paySrcList.push(this.uploadPayFile[i].url)
        this.oldPaySrcList.push(this.uploadPayFile[i].url)
      }
    },
    //修改（返回+补缴+动用+缴纳）
    updateEvent(id, type) {
      this.eventType = 'update'
      this.updateId = id
      this.axios({
        method: 'post',
        url: 'api-d/accass/expand/accassdetail',
        data: {
          id: id,
        },
      })
        .then(
          (res) => {
            if (!res.data.hasError) {
              const result = res.data.result
              this.formData.shouldPay = result.shouldPayTotal
              if (type === 'APPENDED') {
                this.supplyFormVisible = true
                this.loadSupplyDetail(result)
              }
              if (type === 'EXPENDED') {
                this.expenditureFormVisible = true
                this.loadExpenditureDetail(result)
              }
              if (type === 'RETURNED') {
                this.payBackFormVisible = true
                this.loadPayBackDetail(result)
              }
              if (type === 'PAID') {
                this.payFormVisible = true
                this.getProjectList(result)
                this.loadPayDetail(result)
              }
            }
          },
          (res) => {
            this.$message({
              message: '加载详情失败',
              type: 'error',
            })
          }
        )
        .catch((error) => {})
    },
    //删除（返还+补缴+动用）缴纳
    deleteEvent(id, type) {
      this.$confirm('是否确认该条记录?', '删除记录', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
      })
        .then(() => {
          this.deleteRow(id, type)
        })
        .catch(() => {})
    },
    deleteRow(id, type) {
      // 缴纳  和 流水分别是两个接口
      if (type === 'PAID') {
        var url = 'api-d/deposit/expand/delete'
        var data = {
          projectId: this.projectId,
        }
      } else {
        var url = 'api-d/accass/expand/delaccass'
        var data = {
          id: id,
        }
      }
      this.axios({
        method: 'post',
        url: url,
        data: data,
      })
        .then(
          (response) => {
            if (!response.data.hasError) {
              if (type === 'PAID') {
                //清空列表
                this.$emit('func', 'clearList')
              } else {
                this.$message({
                  message: '删除成功',
                  type: 'success',
                })
                this.$refs.pagination.getTableListData()
                this.loadDetail() //重新加载详情
              }
            } else {
              this.$message({
                message: response.data.errorMsg,
                type: 'error',
              })
            }
          },
          (response) => {}
        )
        .catch((error) => {})
    },
    //关闭弹窗
    closeFormDialog(dialogVisible, formName) {
      if (formName === 'supplyForm') {
        this.emptySupplyFormInfo()
      }
      if (formName === 'expenditureForm') {
        this.emptyExpenditureFormInfo()
      }
      if (formName === 'payBackForm') {
        this.emptyPayBackFormInfo()
      }
      if (formName === 'formData') {
        this.emptyPayFormInfo()
      }
    },
    emptySupplyFormInfo() {
      //情况上传组件的数据
      this.supplyForm.srcList = []
      this.supplyForm.oldSrcList = []
      this.supplyForm.uploadFile = []
      this.$nextTick(function () {
        this.$refs.formData.resetFields()
      })
      this.supplyFormVisible = false
    },
    emptyExpenditureFormInfo() {
      this.expenditureFormVisible = false
      this.expenditureForm.srcList = []
      this.expenditureForm.oldSrcList = []
      this.expenditureForm.uploadFile = []
      this.$nextTick(function () {
        this.$refs.expenditureForm.resetFields()
      })
    },
    emptyPayBackFormInfo() {
      this.payBackFormVisible = false
      this.payBackForm.srcList = []
      this.payBackForm.oldSrcList = []
      this.payBackForm.uploadFile = []
      this.$nextTick(function () {
        this.$refs.payBackForm.resetFields()
      })
    },
    emptyPayFormInfo() {
      this.payFormVisible = false
      this.payForm.srcList = []
      this.payForm.oldSrcList = []
      this.payForm.uploadFile = []
      this.$nextTick(function () {
        this.$refs.formData.resetFields()
      })
    },
    //表单提交验证
    saveForm(formName, formVisible) {
      //确定按钮禁止点击
      this.isLoading = true
      this.$refs[formName].validate((valid) => {
        if (valid) {
          var data = ''
          var url = ''
          if (this.eventType === 'add') {
            url = 'api-d/accass/expand/add'
          } else {
            url = 'api-d/accass/expand/updateaccass'
          }
          if (formName === 'supplyForm') {
            //补缴表单
            data = {
              projectId: this.filterField.projectId,
              id: this.updateId,
              operationType: 'APPENDED',
              operationDate: this.supplyForm.date,
              lastTotal: this.shouldSupply,
              total: this.supplyForm.actPay,
              operator: this.supplyForm.operator,
              fileList: JSON.stringify(this.supplyForm.uploadFile),
            }
            if (this.tableData.length == 0) {
              data.bankId = this.supplyForm.bankId
              data.account = this.supplyForm.account
              data.bankName = this.supplyForm.bankName
            }
          }
          if (formName === 'expenditureForm') {
            //动用表单
            data = {
              projectId: this.filterField.projectId,
              id: this.updateId,
              operationType: 'EXPENDED',
              operationDate: this.expenditureForm.date,
              method: this.expenditureForm.payType,
              lastTotal: this.expenditureForm.canPay, //可动用金额
              total: this.expenditureForm.actPay,
              transferInType: this.expenditureForm.accountType,
              transferInAcc: this.expenditureForm.accountNum.replace(
                /\s+/g,
                ''
              ),
              operator: this.expenditureForm.operator,
              reason: this.expenditureForm.reason,
              fileList: JSON.stringify(this.expenditureForm.uploadFile),
            }
          }
          if (formName === 'payBackForm') {
            //返还表单
            data = {
              projectId: this.filterField.projectId,
              id: this.updateId,
              operationType: 'RETURNED',
              operationDate: this.payBackForm.date,
              lastTotal: this.payBackForm.canPay, //可返还金额
              total: this.payBackForm.actPay,
              method: this.payBackForm.payType,
              transferInType: this.payBackForm.accountType,
              transferInAcc: this.payBackForm.accountNum.replace(/\s+/g, ''),
              operator: this.payBackForm.operator,
              reason: this.payBackForm.reason,
              fileList: JSON.stringify(this.payBackForm.uploadFile),
            }
          }
          this.toSave(formName, formVisible, data, url)
        } else {
          this.isLoading = false
          return false
        }
      })
    },
    //表单保存
    //动用添加、修改保存事件
    //返还添加、修改保存事件
    //缴纳修改事件 //表单名、表单数据、表单是否可见
    toSave(formName, formVisible, data, url) {
      this.axios({
        method: 'post',
        url: url,
        data: data,
      })
        .then(
          (response) => {
            this.isLoading = false
            if (!response.data.hasError) {
              this.$message({
                message: '保存成功',
                type: 'success',
              })
              this.$refs.pagination.getTableListData()
              this.loadDetail() //重新加载详情
              this.closeFormDialog(formVisible, formName)
            } else {
              this.$message({
                message: response.data.errorMsg,
                type: 'error',
              })
            }
          },
          (response) => {
            this.isLoading = false
            this.$message({
              message: '数据请求失败',
              type: 'error',
            })
          }
        )
        .catch((error) => {
          this.isLoading = false
        })
    },
    // 获取子组件上传成功后的值
    getUpLoadFileData(data, formName) {
      if (formName === 'supplyUploadForm') {
        this.supplyForm.uploadFile.push(data)
      }
      if (formName === 'expenditureUploadForm') {
        this.expenditureForm.uploadFile.push(data)
      }
      if (formName === 'payBackUploadForm') {
        this.payBackForm.uploadFile.push(data)
      }
      if (formName === 'payUploadForm') {
        this.payForm.uploadFile.push(data)
      }
    },
    getSrcListData(data, formName) {
      if (formName === 'supplyUploadForm') {
        this.supplyForm.srcList.push(data.url)
      }
      if (formName === 'expenditureUploadForm') {
        this.expenditureForm.srcList.push(data.url)
      }
      if (formName === 'payBackUploadForm') {
        this.payBackForm.srcList.push(data.url)
      }
      if (formName === 'payUploadForm') {
        this.payForm.srcList.push(data.url)
      }
    },
    getOldSrcListData(data, formName) {
      if (formName === 'supplyUploadForm') {
        this.supplyForm.oldSrcList.push(data.url)
      }
      if (formName === 'expenditureUploadForm') {
        this.expenditureForm.oldSrcList.push(data.url)
      }
      if (formName === 'payBackUploadForm') {
        this.payBackForm.oldSrcList.push(data.url)
      }
      if (formName === 'payUploadForm') {
        this.payForm.oldSrcList.push(data.url)
      }
    },
    delFile(index, formName, type) {
      if (formName === 'supplyForm') {
        this.supplyForm.uploadFile.splice(index, 1)
        this.supplyForm.srcList.splice(index, 1)
        this.supplyForm.oldSrcList.splice(index, 1)
      }
      if (formName === 'expenditureForm') {
        this.expenditureForm.uploadFile.splice(index, 1)
        this.expenditureForm.srcList.splice(index, 1)
        this.expenditureForm.oldSrcList.splice(index, 1)
      }
      if (formName === 'payBackForm') {
        this.payBackForm.uploadFile.splice(index, 1)
        this.payBackForm.srcList.splice(index, 1)
        this.payBackForm.oldSrcList.splice(index, 1)
      }
      if (formName === 'formData') {
        if (type == '1') {
          this.upLoadFile.splice(index, 1)
          this.srcList.splice(index, 1)
          this.oldSrcList.splice(index, 1)
        } else {
          this.uploadPayFile.splice(index, 1)
          this.paySrcList.splice(index, 1)
          this.oldPaySrcList.splice(index, 1)
        }
      }
      this.loadDetail()
    },
    /**
     * @description: 改变图片地址
     */
    changeSrcListsupplyForm(val) {
      this.supplyForm.srcList = val
    },
    /**
     * @description: 改变图片地址
     */
    changeSrcListexpenditureForm(val) {
      this.expenditureForm.srcList = val
    },
    /**
     * @description: 改变图片地址
     */
    changeSrcListpayBackForm(val) {
      this.payBackForm.srcList = val
    },
    savePayForm(id, formVisible) {
      //修改缴纳
      //确定按钮禁止点击
      this.isLoading = true
      this.$refs['payForm'].validate((valid) => {
        if (valid) {
          let data = {
            projectId: this.filterField.projectId,
            id: this.updateId,
            uscc: this.payForm.companyUscc,
            companyName: this.payForm.payCompany,
            companyType: this.companyType,
            operationDate: this.payForm.date,
            total: this.payForm.actPay,
            operator: this.payForm.operator,
            reason: this.payForm.reason,
            fileList: JSON.stringify(this.payForm.uploadFile),
          }
          this.axios({
            method: 'post',
            url: 'api-d/accass/expand/updateaccass',
            data: data,
          })
            .then(
              (response) => {
                this.isLoading = false
                if (!response.data.hasError) {
                  this.$message({
                    message: '保存成功',
                    type: 'success',
                  })
                  this.payFormVisible = false //关闭弹窗
                  this.$refs.pagination.getTableListData()
                  this.loadDetail() //重新加载详情
                } else {
                  this.$message({
                    message: response.data.errorMsg,
                    type: 'error',
                  })
                }
              },
              (response) => {
                this.isLoading = false
                this.$message({
                  message: '数据请求失败',
                  type: 'error',
                })
              }
            )
            .catch((error) => {
              this.isLoading = false
            })
        } else {
          this.isLoading = false
          return false
        }
      })
    },
    getCompanyName(val) {
      if (val === '0') {
        this.payForm.payCompany = this.companyJS
        this.payForm.companyUscc = this.companyJSUscc
      } else {
        this.payForm.payCompany = this.companySG
        this.payForm.companyUscc = this.companySGUscc
      }
    },
    goBack() {
      this.$router.push({
        name: 'cashDepositList',
        path: '/home/cashDeposit/cashDepositList',
        query: {
          path: 'cashDepositList',
        },
      })
      this.$store.commit('CHANGE_SLIDER_NAME', {
        oldUrl: '/home/cashDeposit/cashDepositList',
        newUrl: this.$router.currentRoute.fullPath,
      })
    },
    resetForm(formName) {
      if (this.$refs[formName] !== undefined) {
        this.$refs[formName].resetFields()
      }
    },
    getProjectList(result) {
      // 打开弹框清空，避免一直添加数组
      this.companyOptions = []
      this.axios({
        method: 'post',
        url: 'api-p/projectstats/expand/list',
        data: {
          pageNo: 1,
          pageSize: 20,
          projectId: this.filterField.projectId,
          projectName: this.cashDepositInfo.projectName,
          isSa: '',
        },
      })
        .then((response) => {
          if (!response.data.hasError) {
            this.projectOptions = response.data.result.results
            this.total = response.data.result.total
            this.$nextTick(() => {
              var currentObj = this.projectOptions[0]
              this.formData.projectJson = currentObj
              if (currentObj) {
                ;(this.currentObjAreaId = currentObj.areaId),
                  (this.currentObjTotal = currentObj.total),
                  this.companyOptions.push(
                    {
                      companyName: currentObj.pcName,
                      companyType: '0', //建设方
                    },
                    {
                      companyName: currentObj.pbName,
                      companyType: '5', //施工方
                    }
                  )
                this.getBankNameList(currentObj.areaId)
                this.currentProjectAreaId = currentObj.areaId
                this.currentProjectTotal = currentObj.total
                this.getCountShould(
                  currentObj.areaId,
                  currentObj.total,
                  this.formData.method
                )
                // this.verifyIsExesit(currentObj.projectId);
                //缴纳修改初始化数据
                this.getCashDepositInfo()
              }
            })
          }
        })
        .catch((error) => {})
    },
    getCashDepositInfo() {
      this.axios({
        method: 'post',
        url: 'api-d/deposit/expand/detail',
        data: {
          id: this.depositId,
        },
      })
        .then((response) => {
          var data = response.data.result
          this.getBondSetting(data.areaId, data.projectTotal, data.method)

          this.formDataShouldPay = data.shouldPayTotalReal + '-' + data.payScale
          this.formData.projectName = data.projectName
          this.formData.companyName = data.companyName
          this.formData.reciveunit = data.companyType
          this.formData.operationDate = data.operationDate
          this.formData.method = data.method
          this.formData.payMethod = data.payMethod
          this.formData.bankOne =
            data.bankId + ',' + data.account + ',' + data.bankName
          //相当于点击按钮赋值
          this.changeBankName(this.formData.bankOne)
          this.formData.account = data.account
          this.formData.reduceMoney = data.exemptionAccount
          this.formData.shouldPayTotal = data.shouldPayTotal || '0'
          this.formData.projectTotal = data.projectTotal || '0'
          this.calculatePayTotal = data.payTotalReal || '0'
          this.formData.payTotal = data.payTotalReal || '0'
          // this.formData.upperLimit = data.upperLimit || "0";
          this.formData.payScale = data.payScale || '0'
          this.formData.guaranteeName = data.guaranteeName
          this.formData.guaranteeStartDate = data.guaranteeStartDate
          this.formData.guaranteeEndDate = data.guaranteeEndDate
          this.formData.operator = data.operator
          this.formData.remark = data.remark
          this.formData.reduceRemark = data.remark
          //状态标志图片
          this.status = data.status
          this.upLoadFile = data.file
          this.payForm.uploadFile = data.file
          //详情减免凭证，缓缴凭证
          for (var i = 0; i < this.payForm.uploadFile.length; i++) {
            this.payForm.srcList.push(this.payForm.uploadFile[i].url)
            this.payForm.oldSrcList.push(this.payForm.uploadFile[i].url)
          }
          for (var i = 0; i < this.upLoadFile.length; i++) {
            this.srcList.push(this.upLoadFile[i].url)
            this.oldSrcList.push(this.upLoadFile[i].url)
          }
          this.showFileText()
          // 黄石地区
          if (this.isHsUser()) {
            this.$set(this.formData, 'institution', data.institution)
            this.$set(this.formData, 'branch', data.branch)
            this.$set(this.formData, 'name', data.name)
            this.$set(this.formData, 'cardCode', data.cardCode)
            this.$set(this.formRules, 'institution', [
              { required: true, message: '请输入开户银行', trigger: 'blur' },
              {
                required: true,
                min: 1,
                max: 10,
                message: '支持输入1-10个字符',
                trigger: 'blur',
              },
            ])
            this.$set(this.formRules, 'branch', [
              { required: true, message: '请输入支行名称', trigger: 'blur' },
              {
                required: true,
                min: 1,
                max: 30,
                message: '支持输入1-30个字符',
                trigger: 'blur',
              },
            ])
            this.$set(this.formRules, 'name', [
              { required: true, message: '请输入账户名称', trigger: 'blur' },
              {
                required: true,
                min: 1,
                max: 30,
                message: '支持输入1-30个字符',
                trigger: 'blur',
              },
            ])
            this.$set(this.formRules, 'cardCode', [
              { required: true, message: '请输入银行卡号', trigger: 'blur' },
              {
                required: true,
                pattern: /^[\d\-\(\)\ ]{7,30}$/,
                message: '只能输入7-30位数字',
                trigger: 'blur',
              },
            ])
          }
        })
        .catch((error) => {})
    },
    getCountShould(areaId, total, depositType) {
      this.axios({
        method: 'post',
        url: 'api-d/deposit/expand/countshould',
        data: {
          areaId: areaId,
          total: total,
          depositType: depositType,
        },
      })
        .then((response) => {
          var data = response.data
          if (!data.hasError) {
            var result = response.data.result
            this.amountPayableList = response.data.result
            this.sectionType = result.sectionType
            // this.formData.shouldPay = result.shouldPay || "0";
            // this.formData.total = result.total || "0";
            // this.formData.scale = result.depositConfig.scale || "0";
            // this.formData.upperLimit =
            //     result.depositConfig.upperLimit || "0";
          }
        })
        .catch((error) => {})
    },
    getBankNameList(areaId) {
      this.axios({
        method: 'post',
        url: 'api-d/account/expand/finddprobank',
        data: {
          areaId: areaId,
        },
      })
        .then((response) => {
          if (!response.data.hasError) {
            var data = response.data.result
            if (data.length > 0) {
              this.noBank = false
              this.bankNameList = data
            } else {
              this.noBank = true
            }
          }
        })
        .catch((error) => {})
    },
    changeBankName(val) {
      // 获取选中的银行卡号
      var bankOne = val.split(',')
      this.formData.bankId = bankOne[0]
      this.formData.account = bankOne[1]
      this.formData.bankName = bankOne[2]
    },
    payTypeChange(val) {
      this.showFileText()
      // 黄石地区
      if (this.isHsUser()) {
        this.expressFile = []
        this.uploadPayFile = []
        this.$set(this.formData, 'institution', '')
        this.$set(this.formData, 'branch', '')
        this.$set(this.formData, 'name', '')
        this.$set(this.formData, 'cardCode', '')
        if (val === 'FUNDDEPOSIT') {
          delete this.formData.senderFileJson
          delete this.formRules.senderFileJson
          delete this.formRules.checked

          this.$set(this.formRules, 'institution', [
            { required: true, message: '请输入开户银行', trigger: 'blur' },
            {
              required: true,
              min: 1,
              max: 10,
              message: '支持输入1-10个字符',
              trigger: 'blur',
            },
          ])
          this.$set(this.formRules, 'branch', [
            { required: true, message: '请输入支行名称', trigger: 'blur' },
            {
              required: true,
              min: 1,
              max: 30,
              message: '支持输入1-30个字符',
              trigger: 'blur',
            },
          ])
          this.$set(this.formRules, 'name', [
            { required: true, message: '请输入账户名称', trigger: 'blur' },
            {
              required: true,
              min: 1,
              max: 30,
              message: '支持输入1-30个字符',
              trigger: 'blur',
            },
          ])
          this.$set(this.formRules, 'cardCode', [
            { required: true, message: '请输入银行卡号', trigger: 'blur' },
            {
              required: true,
              pattern: /^[\d\-\(\)\ ]{7,30}$/,
              message: '只能输入7-30位数字',
              trigger: 'blur',
            },
          ])
        } else if (['BANKGUARANTEE', 'BANKPOLICY'].includes(val)) {
          this.$set(this.formRules, 'institution', [
            { required: true, message: '请输入寄件人姓名', trigger: 'blur' },
            {
              required: true,
              min: 1,
              max: 20,
              message: '支持输入1-20个字符',
              trigger: 'blur',
            },
          ])
          this.$set(this.formRules, 'branch', [
            { required: true, message: '请输入寄件人电话', trigger: 'blur' },
            {
              required: true,
              pattern: /^[\d\-\(\)\ ]{7,11}$/,
              message: '只能输入7-11位数字',
              trigger: 'blur',
            },
          ])
          this.$set(this.formRules, 'name', [
            { required: true, message: '请输入快递公司', trigger: 'blur' },
            {
              required: true,
              min: 1,
              max: 10,
              message: '支持输入1-10个字符',
              trigger: 'blur',
            },
          ])
          this.$set(this.formRules, 'cardCode', [
            { required: true, message: '请输入快递单号', trigger: 'blur' },
            {
              required: true,
              min: 1,
              max: 30,
              message: '支持输入1-30个字符',
              trigger: 'blur',
            },
          ])
          this.$set(this.formData, 'senderFileJson', [])
          this.$set(this.formData, 'checked', false)
          this.$set(this.formRules, 'senderFileJson', [
            {
              required: true,
              validator: this.checkExpressFile,
              trigger: 'change',
            },
          ])
        }
      }
      //切换缴纳方式应缴金额变化
      this.getCountShould(
        this.currentProjectAreaId,
        this.currentProjectTotal,
        this.formData.method
      )
      this.showForm = false
      // 重置验证不重置表单内容
      this.$nextTick(() => {
        this.showForm = true
        // this.$refs.formData.clearValidate();
      })
    },
    submitFormUptate(params) {
      this.isSaveLoading = true
      //资金存入
      var fundDeposit = this.formData.method === 'FUNDDEPOSIT'
      var allPay = this.formData.payMethod === 'ALL_PAY'
      var partPay = this.formData.payMethod === 'PART_PAY'
      var allNoPay = this.formData.payMethod === 'ALL_NO_PAY'
      var waitPay = this.formData.payMethod === 'WAIT_PAY'
      var fileJson, exemptionAccount, payTotal
      if (fundDeposit && (partPay || allNoPay || waitPay)) {
        fileJson = JSON.stringify(this.upLoadFile)
      } else {
        fileJson = JSON.stringify(this.uploadPayFile)
      }
      // 减免金额和全额免缴 都传 exemptionAccount
      if (fundDeposit && partPay) {
        exemptionAccount = this.formData.reduceMoney
      } else if (fundDeposit && allNoPay) {
        exemptionAccount = this.formData.shouldPay
      } else {
        exemptionAccount = ''
      }
      //1.全额免缴和缓缴没有实缴金额   2.部分免缴中 实缴由计算得出
      if (fundDeposit && (allNoPay || waitPay)) {
        payTotal = ''
      } else if (fundDeposit && partPay) {
        payTotal = this.calculatePayTotal
      } else {
        payTotal = this.formData.payTotal
      }
      var data = {
        id: this.depositId, //保证金id
        accassId: this.updateId, //流水id
        projectJson: JSON.stringify(this.formData.projectJson),
        companyType: this.formData.reciveunit,
        method: this.formData.method,
        // 资金存入-缴纳形式
        payMethod: fundDeposit ? this.formData.payMethod : '',
        operationDateString: this.formData.operationDate,
        // 资金存入-（全额缴纳/部分免缴）存在缴纳银行和缴纳账号信息
        bankId: fundDeposit && (allPay || partPay) ? this.formData.bankId : '',
        bankName:
          fundDeposit && (allPay || partPay) ? this.formData.bankName : '',
        account:
          fundDeposit && (allPay || partPay) ? this.formData.account : '',
        // shouldPayTotal: this.formData.shouldPay,
        // payScale: this.formData.scale, //后台新增字段
        shouldPayTotal: this.formDataShouldPay.split('-')[0],
        payScale: this.formDataShouldPay.split('-')[1], //后台新增字段
        // 全额免缴和缓缴没有实缴金额
        payTotal: payTotal, //实缴金额
        exemptionAccount: exemptionAccount,
        //非资金存入 担保机构，担保生效日，担保失效日
        guaranteeName: fundDeposit ? '' : this.formData.guaranteeName,
        guaranteeStartDateString: fundDeposit
          ? ''
          : this.formData.guaranteeStartDate,
        guaranteeEndDateString: fundDeposit
          ? ''
          : this.formData.guaranteeEndDate,
        operator: this.formData.operator,
        //部分免缴，全额免缴，缓缴 原因为必填项
        remark:
          fundDeposit && (partPay || allNoPay || waitPay)
            ? this.formData.reduceRemark
            : this.formData.remark,
        // 部分免缴的    缴纳凭证用noAllPayFileJson  其他凭证名字都用fileJson
        //减免凭证，缓缴凭证，缓缴凭证
        noAllPayFileJson:
          fundDeposit && partPay ? JSON.stringify(this.uploadPayFile) : [],
        //缴纳凭证
        // 非资金存入及资金存入全额缴纳/部分缴纳有缴纳凭证
        fileJson: fileJson,
      }
      //黄石地区
      if (this.isHsUser()) {
        data.institution = this.formData.institution
        data.branch = this.formData.branch
        data.name = this.formData.name
        data.cardCode = this.formData.cardCode

        if (['BANKGUARANTEE', 'BANKPOLICY'].includes(this.formData.method)) {
          data.senderFileJson = JSON.stringify(this.expressFile)
          data.isConfirm = this.formData.checked ? 1 : 0
        }
      }
      this.axios({
        method: 'post',
        url: 'api-d/deposit/expand/eidtdeposit',
        data: data,
      })
        .then((response) => {
          this.isSaveLoading = false
          if (!response.data.hasError) {
            this.$message({
              message: '修改成功',
              type: 'success',
            })
            this.payFormVisible = false
            this.$nextTick(() => {
              //不改变缴纳方式形式，详情保持不变
              if (
                this.formData.method === 'FUNDDEPOSIT' &&
                (this.formData.payMethod === 'ALL_PAY' ||
                  this.formData.payMethod === 'PART_PAY' ||
                  this.formData.payMethod === 'WAIT_PAY')
              ) {
                this.$refs.pagination.getTableListData()
                this.loadDetail()
              } else {
                this.$emit(
                  'func',
                  this.projectId,
                  this.formData.projectName,
                  this.depositId,
                  this.formData.method,
                  fundDeposit ? this.formData.payMethod : '',
                  this.approvalStatusDesc
                )
              }
            })
          } else {
            this.$message({
              type: 'error',
              message: response.data.errorMsg,
            })
          }
        })
        .catch((error) => {})
    },
    //保存跳转到详情
    saveToDetail() {
      this.$refs.formData.validate((valid) => {
        if (this.isHsUser()) {
          if (
            ['BANKGUARANTEE', 'BANKPOLICY'].includes(this.formData.method) &&
            !this.formData.checked
          ) {
            this.$message({
              type: 'warning',
              message: '请先同意施工单位承诺书',
            })
            return false
          }
        }
        if (valid) {
          //监察无需二次提示，无需审核
          if (this.loginType === 'JC') {
            this.submitFormUptate()
          } else {
            this.$confirm(
              '是否提交缴存备案申报，提交后劳动监察会对本次备案进行审核，审核通过后即可纳入正式备案统计',
              '提示',
              {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning',
              }
            )
              .then(() => {
                this.submitFormUptate()
              })
              .catch(() => {})
          }
        } else {
          return false
        }
      })
    },
    //计算部分免缴中的实缴金额
    changeCount() {
      let shouldPay = this.formDataShouldPay.split('-')[0]
      if (this.formData.reduceMoney > 0 && shouldPay) {
        this.axios({
          method: 'post',
          url: 'api-d/deposit/expand/calculaccount',
          data: {
            shouldPay: shouldPay,
            exemptionAccount: this.formData.reduceMoney,
          },
        })
          .then((response) => {
            if (!response.data.hasError) {
              this.calculatePayTotal = response.data.result.payTotal
            } else {
              this.$message({
                type: 'error',
                message: response.data.errorMsg,
              })
            }
          })
          .catch((error) => {})
      } else {
        this.calculatePayTotal = ''
      }
    },
    //监察审核
    toCheckEvent(id, type) {
      this.$confirm(
        '请核对企业申报的保证金流水信息，如无误则无法删除，仅可修改，请谨慎操作',
        '提示',
        {
          confirmButtonText: '确认',
          cancelButtonText: '取消',
          type: 'warning',
        }
      )
        .then(() => {
          this.checkRequset(id)
        })
        .catch(() => {
          //取消
        })
    },
    checkRequset(id) {
      this.axios({
        method: 'post',
        url: 'api-d/deposit/expand/depositapproval',
        data: {
          depositAccassId: id, //流水id
          depositId: this.depositId, //保证金id
        },
      })
        .then((res) => {
          if (!res.data.hasError) {
            this.$message({
              message: '审核通过',
              type: 'success',
            })
            this.$refs.pagination.getTableListData()
            this.loadDetail() //重新加载详情
          } else {
            this.$message({
              message: response.data.errorMsg,
              type: 'error',
            })
          }
        })
        .catch((error) => {})
    },
    //监察驳回
    toRejectEvent(id, type) {
      this.depositAccassId = id
      this.formVisibleReject = true
    },
    //驳回保存
    submitRejectSave() {
      this.$refs.formDataReject.validate((valid) => {
        if (valid) {
          this.rejectRequset()
        } else {
          return false
        }
      })
    },
    closeDialog() {},
    handleClose() {
      this.formVisibleReject = false
      this.$refs['formDataReject'].resetFields()
    },
    rejectRequset(id) {
      this.axios({
        method: 'post',
        url: 'api-d/deposit/expand/depositrecall',
        data: {
          depositAccassId: this.depositAccassId, //流水id
          depositId: this.depositId, //保证金id
          rejectionReason: this.formDataReject.reason,
        },
      })
        .then((res) => {
          if (!res.data.hasError) {
            this.$message({
              message: '驳回成功',
              type: 'success',
            })
            //监察驳回
            this.$nextTick(() => {
              // 1.驳回列表只有一条数据跳监察列表 2.如有多条则刷新当前页面
              if ((this.tableData.length = 1)) {
                this.$router.push('/home/cashDeposit/cashDepositListJC')
                this.$store.commit('CHANGE_SLIDER_NAME', {
                  oldUrl: '/home/cashDeposit/cashDepositListJC',
                  newUrl: this.$router.currentRoute.fullPath,
                })
              } else {
                this.formVisibleReject = false
                this.$refs.pagination.getTableListData()
                this.loadDetail() //重新加载详情
              }
            })
          } else {
            this.$message({
              message: response.data.errorMsg,
              type: 'error',
            })
          }
        })
        .catch((error) => {})
    },
    toUploadFile() {
      this.uploadContract = true
    },
    hiddenDialog() {
      this.uploadContract = false
    },
    toUploadFileTwo() {
      this.uploadContractTwo = true
    },
    hiddenDialogTwo() {
      this.uploadContractTwo = false
    },
    toUploadFileThree() {
      this.uploadContractThree = true
    },
    hiddenDialogThree() {
      this.uploadContractThree = false
    },
    getFileListExpend(val) {
      this.expenditureForm.oldSrcList.push(val)
      this.expenditureForm.srcList.push(val)
    },
    getFileExpend(val) {
      this.expenditureForm.uploadFile = val
    },
    getFileListSupply(val) {
      this.supplyForm.oldSrcList.push(val)
      this.supplyForm.srcList.push(val)
    },
    getFileSupply(val) {
      this.supplyForm.uploadFile = val
    },
    getFileListPayBack(val) {
      this.payBackForm.oldSrcList.push(val)
      this.payBackForm.srcList.push(val)
    },
    getFilePayBack(val) {
      this.supplyForm.uploadFile = val
    },
    getFileList(val) {
      this.oldSrcList.push(val)
      this.srcList.push(val)
    },
    getFile(val) {
      this.upLoadFile = val
    },
    getFileListPay(val) {
      this.paySrcList.push(val)
      this.oldPaySrcList.push(val)
    },
    getFilePay(val) {
      this.uploadPayFile = val
    },
    showFileText() {
      if (this.formData.method == 'FUNDDEPOSIT') {
        this.limitationFactorPay.methodTip =
          '请上传缴款回执单，附件格式支持png，jpg，jpeg，doc，docx，xls，xlsx，pdf，最多上传10个附件'
      } else if (this.formData.method == 'BANKGUARANTEE') {
        this.limitationFactorPay.methodTip =
          '请上传银行保函单，附件格式支持png，jpg，jpeg，doc，docx，xls，xlsx，pdf，最多上传10个附件'
      } else if (this.formData.method == 'OWNERPOLICY') {
        this.limitationFactorPay.methodTip =
          '请上传业主担保单，附件格式支持png，jpg，jpeg，doc，docx，xls，xlsx，pdf，最多上传10个附件'
      } else {
        this.limitationFactorPay.methodTip =
          '请上传保险保单，附件格式支持png，jpg，jpeg，doc，docx，xls，xlsx，pdf，最多上传10个附件'
      }
      if (this.formData.payMethod == 'PART_PAY') {
        this.limitationFactor.methodTip =
          '请上传减免凭证，附件格式支持png，jpg，jpeg，doc，docx，xls，xlsx，pdf，最多上传10个附件'
      } else if (this.formData.payMethod == 'ALL_NO_PAY') {
        this.limitationFactor.methodTip =
          '请上传免缴凭证，附件格式支持png，jpg，jpeg，doc，docx，xls，xlsx，pdf，最多上传10个附件'
      } else if (this.formData.payMethod == 'WAIT_PAY') {
        this.limitationFactor.methodTip =
          '请上传缓缴凭证，附件格式支持png，jpg，jpeg，doc，docx，xls，xlsx，pdf，最多上传10个附件'
      }
    },
  },
}
</script>
<style scoped lang="less">
.containerWrap {
  padding: 24px 0;
  .greenWord {
    color: #009588;
    font-weight: bold;
  }
  /deep/.el-radio {
    line-height: 35px;
  }
  .mainContent {
    background: #fff;
    padding: 0 24px 24px;
    .topInfo {
      height: 38px;
      font-size: 14px;
      ul li {
        float: left;
        span:last-child {
          margin-right: 60px;
        }
      }
    }
    .topSection {
      height: 96px;
      padding: 24px 24px 24px 48px;
      background: #e4ebf1;
      color: #333;
      .iconfanhui1 {
        position: absolute;
        cursor: pointer;
        left: 24px;
        top: 28px;
      }
      .topName {
        font: bold 18px Microsoft YaHei;
        line-height: 18px;
        margin-bottom: 16px;
      }
      .topInfo {
        font-size: 14px;
        line-height: 14px;
      }
    }
    .centerSection {
      width: 848px;
      height: 168px;
      background: #f5f7fb;
      border: 1px solid #dee5f4;
      padding: 24px;
      position: relative;
      .centerLeft {
        border-right: 1px solid #d5dee7;
        .centerTitle {
          font: bold 18px Microsoft YaHei;
          line-height: 18px;
          color: #333;
        }
        .balanceTotal {
          margin: 22px 0;
          line-height: 24px;
          color: #009588;
          font-size: 24px;
        }
        .btn {
          .el-button {
            width: 80px;
            height: 32px;
            background: #009588;
            color: #fff;
            padding: 0;
            border: none;
          }
        }
      }
      .centerRight {
        color: #333;
        font-size: 16px;
        line-height: 16px;
        padding-left: 56px;
        span {
          color: #009588;
        }
        .mrginTop {
          margin-top: 25px;
        }
        .mrginTopLess {
          margin-top: 18px;
        }
        .imgs {
          position: absolute;
          top: -12px;
          left: 700px;
          width: 345px;
          img {
            width: 168px;
            height: 123px;
          }
        }
      }
    }
  }
  .tableBlock {
    padding: 24px;
  }
  // 弹窗样式
  .el-dialog {
    .unitMaLf {
      margin-left: 5px;
    }
    .uploadRemark {
      margin-top: 10px;
      line-height: 18px;
    }
    //  附件样式
    // .uploadBox {
    //     position: relative;
    //     width: 96px;
    //     .uploadBtn {
    //         width: 96px;
    //         height: 36px;
    //         color: #009588;
    //         border: 1px solid #009588;
    //         cursor: pointer;
    //         padding: 0px;
    //     }
    //     .uploadImgState {
    //         position: absolute;
    //         width: 96px;
    //         height: 36px;
    //         top: 0;
    //         left: 0;
    //         opacity: 0;
    //         cursor: pointer;
    //         form {
    //             width: 96px;
    //             height: 36px;
    //             input {
    //                 width: 96px;
    //                 height: 36px;
    //             }
    //         }
    //     }
    // }
    // .imgStyle {
    //     padding-left: 100px;
    //     li {
    //         position: relative;
    //         margin-right: 20px;
    //         i {
    //             position: absolute;
    //             right: -6px;
    //             top: -10px;
    //             font-size: 20px;
    //             cursor: pointer;
    //         }
    //     }
    // }
  }
  .detailDialog {
    .gridContent {
      line-height: 16px !important;
    }
    .labelWidthSty {
      height: auto !important;
    }
    .el-row {
      height: 35px;
      line-height: 35px;
      margin-bottom: 10px;
    }
    .el-col-6 {
      text-align: right;
    }
    .el-col-18 {
      text-align: left;
      padding-left: 15px;
    }
    .imgStyle {
      div {
        width: 100px;
        height: 100px;
        float: left;
        margin-right: 10px;
        margin-bottom: 10px;
      }
    }
  }
  //缴纳凭证附件样式
  .payFormXg .uploadBoxPay {
    position: relative;
    .uploadImg {
      width: 96px;
      height: 40px;
      color: #009588;
      border: 1px solid #009588;
      cursor: pointer;
    }
    .uploadImgState {
      font-size: 14px;
      color: #999999;
      margin-left: 12px;
      opacity: 1;
    }
    .upLoadDom {
      position: absolute;
      width: 96px;
      height: 40px;
      top: 0;
      left: 0;
      opacity: 0;
      line-height: 0px;
      form {
        input {
          width: 96px;
          height: 40px;
          line-height: 0px;
          cursor: pointer;
        }
      }
    }
  }
  .imgStyle {
    padding-left: 120px;
    li {
      position: relative;
      margin-right: 20px;
      // margin-top: 10px;
      i {
        position: absolute;
        right: -6px;
        top: -10px;
        font-size: 20px;
      }
    }
  }
}
@media only screen and (max-width: 1280px) {
  .containerWrap .mainContent .centerSection .centerRight .imgs {
    left: 580px;
  }
  .containerWrap .mainContent .centerSection {
    width: 750px;
  }
}
.ratioWidth {
  width: 340px;
}
.form {
  padding-top: 8px;
}
.formItemTip {
  width: 394px;
  line-height: 20px;
  padding: 8px 0;
}
.labelWidthSty {
  display: block !important;
}
@import '../../../static/css/filterArea.less';
</style>
